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 S Fascinate 4G (SGH-T959P) based on S5PV210";
0010         compatible = "samsung,fascinate4g", "samsung,aries", "samsung,s5pv210";
0011         chassis-type = "handset";
0012 
0013         chosen {
0014                 stdout-path = &uart2;
0015         };
0016 
0017         gpio-keys {
0018                 compatible = "gpio-keys";
0019 
0020                 key-power {
0021                         label = "power";
0022                         gpios = <&gph2 6 GPIO_ACTIVE_LOW>;
0023                         linux,code = <KEY_POWER>;
0024                         wakeup-source;
0025                 };
0026 
0027                 key-vol-down {
0028                         label = "volume_down";
0029                         gpios = <&gph3 2 GPIO_ACTIVE_LOW>;
0030                         linux,code = <KEY_VOLUMEDOWN>;
0031                 };
0032 
0033                 key-vol-up {
0034                         label = "volume_up";
0035                         gpios = <&gph3 1 GPIO_ACTIVE_LOW>;
0036                         linux,code = <KEY_VOLUMEUP>;
0037                 };
0038         };
0039 
0040         headset_micbias_reg: regulator-fixed-3 {
0041                 compatible = "regulator-fixed";
0042                 regulator-name = "Headset_Micbias";
0043                 gpio = <&gpj2 5 GPIO_ACTIVE_HIGH>;
0044                 enable-active-high;
0045 
0046                 pinctrl-names = "default";
0047                 pinctrl-0 = <&headset_micbias_ena>;
0048         };
0049 
0050         main_micbias_reg: regulator-fixed-4 {
0051                 compatible = "regulator-fixed";
0052                 regulator-name = "Main_Micbias";
0053                 gpio = <&gpj4 2 GPIO_ACTIVE_HIGH>;
0054                 enable-active-high;
0055 
0056                 pinctrl-names = "default";
0057                 pinctrl-0 = <&main_micbias_ena>;
0058         };
0059 
0060         sound {
0061                 compatible = "samsung,fascinate4g-wm8994";
0062 
0063                 model = "Fascinate4G";
0064 
0065                 extcon = <&fsa9480>;
0066 
0067                 main-micbias-supply = <&main_micbias_reg>;
0068                 headset-micbias-supply = <&headset_micbias_reg>;
0069 
0070                 earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>;
0071 
0072                 io-channels = <&adc 3>;
0073                 io-channel-names = "headset-detect";
0074                 headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>;
0075                 headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
0076 
0077                 samsung,audio-routing =
0078                         "HP", "HPOUT1L",
0079                         "HP", "HPOUT1R",
0080 
0081                         "SPK", "SPKOUTLN",
0082                         "SPK", "SPKOUTLP",
0083 
0084                         "RCV", "HPOUT2N",
0085                         "RCV", "HPOUT2P",
0086 
0087                         "LINE", "LINEOUT2N",
0088                         "LINE", "LINEOUT2P",
0089 
0090                         "IN1LP", "Main Mic",
0091                         "IN1LN", "Main Mic",
0092 
0093                         "IN1RP", "Headset Mic",
0094                         "IN1RN", "Headset Mic",
0095 
0096                         "Modem Out", "Modem TX",
0097                         "Modem RX", "Modem In",
0098 
0099                         "Bluetooth SPK", "TX",
0100                         "RX", "Bluetooth Mic";
0101 
0102                 pinctrl-names = "default";
0103                 pinctrl-0 = <&headset_det &earpath_sel>;
0104 
0105                 cpu {
0106                         sound-dai = <&i2s0>, <&bt_codec>;
0107                 };
0108 
0109                 codec {
0110                         sound-dai = <&wm8994>;
0111                 };
0112         };
0113 };
0114 
0115 &fg {
0116         compatible = "maxim,max77836-battery";
0117 
0118         interrupt-parent = <&gph3>;
0119         interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
0120 
0121         pinctrl-names = "default";
0122         pinctrl-0 = <&fg_irq>;
0123 };
0124 
0125 &pinctrl0 {
0126         pinctrl-names = "default";
0127         pinctrl-0 = <&sleep_cfg>;
0128 
0129         headset_det: headset-det-pins {
0130                 samsung,pins = "gph0-6", "gph3-6";
0131                 samsung,pin-function = <S5PV210_PIN_FUNC_F>;
0132                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0133         };
0134 
0135         fg_irq: fg-irq-pins {
0136                 samsung,pins = "gph3-3";
0137                 samsung,pin-function = <S5PV210_PIN_FUNC_F>;
0138                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0139                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0140         };
0141 
0142         headset_micbias_ena: headset-micbias-ena-pins {
0143                 samsung,pins = "gpj2-5";
0144                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0145                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0146         };
0147 
0148         earpath_sel: earpath-sel-pins {
0149                 samsung,pins = "gpj2-6";
0150                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0151                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0152         };
0153 
0154         main_micbias_ena: main-micbias-ena-pins {
0155                 samsung,pins = "gpj4-2";
0156                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0157                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0158         };
0159 
0160         /* Based on vendor kernel v2.6.35.7 */
0161         sleep_cfg: sleep-state {
0162                 PIN_SLP(gpa0-0, PREV, NONE);
0163                 PIN_SLP(gpa0-1, PREV, NONE);
0164                 PIN_SLP(gpa0-2, PREV, NONE);
0165                 PIN_SLP(gpa0-3, OUT1, NONE);
0166                 PIN_SLP(gpa0-4, PREV, NONE);
0167                 PIN_SLP(gpa0-5, PREV, NONE);
0168                 PIN_SLP(gpa0-6, PREV, NONE);
0169                 PIN_SLP(gpa0-7, PREV, NONE);
0170 
0171                 PIN_SLP(gpa1-0, INPUT, DOWN);
0172                 PIN_SLP(gpa1-1, OUT0, NONE);
0173                 PIN_SLP(gpa1-2, INPUT, DOWN);
0174                 PIN_SLP(gpa1-3, OUT0, NONE);
0175 
0176                 PIN_SLP(gpb-0, OUT0, NONE);
0177                 PIN_SLP(gpb-1, OUT1, NONE);
0178                 PIN_SLP(gpb-2, OUT0, NONE);
0179                 PIN_SLP(gpb-3, PREV, NONE);
0180                 PIN_SLP(gpb-4, INPUT, NONE);
0181                 PIN_SLP(gpb-5, PREV, NONE);
0182                 PIN_SLP(gpb-6, INPUT, DOWN);
0183                 PIN_SLP(gpb-7, OUT0, NONE);
0184 
0185                 PIN_SLP(gpc0-0, OUT0, NONE);
0186                 PIN_SLP(gpc0-1, INPUT, DOWN);
0187                 PIN_SLP(gpc0-2, OUT0, NONE);
0188                 PIN_SLP(gpc0-3, INPUT, DOWN);
0189                 PIN_SLP(gpc0-4, OUT0, NONE);
0190 
0191                 PIN_SLP(gpc1-0, INPUT, DOWN);
0192                 PIN_SLP(gpc1-1, INPUT, DOWN);
0193                 PIN_SLP(gpc1-2, INPUT, DOWN);
0194                 PIN_SLP(gpc1-3, INPUT, DOWN);
0195                 PIN_SLP(gpc1-4, INPUT, DOWN);
0196 
0197                 PIN_SLP(gpd0-0, INPUT, DOWN);
0198                 PIN_SLP(gpd0-1, OUT0, NONE);
0199                 PIN_SLP(gpd0-2, INPUT, DOWN);
0200                 PIN_SLP(gpd0-3, INPUT, DOWN);
0201 
0202                 PIN_SLP(gpd1-0, INPUT, NONE);
0203                 PIN_SLP(gpd1-1, INPUT, NONE);
0204                 PIN_SLP(gpd1-2, INPUT, DOWN);
0205                 PIN_SLP(gpd1-3, INPUT, DOWN);
0206                 PIN_SLP(gpd1-4, INPUT, DOWN);
0207                 PIN_SLP(gpd1-5, INPUT, DOWN);
0208 
0209                 PIN_SLP(gpe0-0, INPUT, DOWN);
0210                 PIN_SLP(gpe0-1, INPUT, DOWN);
0211                 PIN_SLP(gpe0-2, INPUT, DOWN);
0212                 PIN_SLP(gpe0-3, INPUT, DOWN);
0213                 PIN_SLP(gpe0-4, INPUT, DOWN);
0214                 PIN_SLP(gpe0-5, INPUT, DOWN);
0215                 PIN_SLP(gpe0-6, INPUT, DOWN);
0216                 PIN_SLP(gpe0-7, INPUT, DOWN);
0217 
0218                 PIN_SLP(gpe1-0, INPUT, DOWN);
0219                 PIN_SLP(gpe1-1, INPUT, DOWN);
0220                 PIN_SLP(gpe1-2, INPUT, DOWN);
0221                 PIN_SLP(gpe1-3, OUT0, NONE);
0222                 PIN_SLP(gpe1-4, INPUT, DOWN);
0223 
0224                 PIN_SLP(gpf0-0, OUT0, NONE);
0225                 PIN_SLP(gpf0-1, OUT0, NONE);
0226                 PIN_SLP(gpf0-2, OUT0, NONE);
0227                 PIN_SLP(gpf0-3, OUT0, NONE);
0228                 PIN_SLP(gpf0-4, OUT0, NONE);
0229                 PIN_SLP(gpf0-5, OUT0, NONE);
0230                 PIN_SLP(gpf0-6, OUT0, NONE);
0231                 PIN_SLP(gpf0-7, OUT0, NONE);
0232 
0233                 PIN_SLP(gpf1-0, OUT0, NONE);
0234                 PIN_SLP(gpf1-1, OUT0, NONE);
0235                 PIN_SLP(gpf1-2, OUT0, NONE);
0236                 PIN_SLP(gpf1-3, OUT0, NONE);
0237                 PIN_SLP(gpf1-4, OUT0, NONE);
0238                 PIN_SLP(gpf1-5, OUT0, NONE);
0239                 PIN_SLP(gpf1-6, OUT0, NONE);
0240                 PIN_SLP(gpf1-7, OUT0, NONE);
0241 
0242                 PIN_SLP(gpf2-0, OUT0, NONE);
0243                 PIN_SLP(gpf2-1, OUT0, NONE);
0244                 PIN_SLP(gpf2-2, OUT0, NONE);
0245                 PIN_SLP(gpf2-3, OUT0, NONE);
0246                 PIN_SLP(gpf2-4, OUT0, NONE);
0247                 PIN_SLP(gpf2-5, OUT0, NONE);
0248                 PIN_SLP(gpf2-6, OUT0, NONE);
0249                 PIN_SLP(gpf2-7, OUT0, NONE);
0250 
0251                 PIN_SLP(gpf3-0, OUT0, NONE);
0252                 PIN_SLP(gpf3-1, OUT0, NONE);
0253                 PIN_SLP(gpf3-2, OUT0, NONE);
0254                 PIN_SLP(gpf3-3, OUT0, NONE);
0255                 PIN_SLP(gpf3-4, PREV, NONE);
0256                 PIN_SLP(gpf3-5, INPUT, DOWN);
0257 
0258                 PIN_SLP(gpg0-0, INPUT, DOWN);
0259                 PIN_SLP(gpg0-1, INPUT, DOWN);
0260                 PIN_SLP(gpg0-2, INPUT, NONE);
0261                 PIN_SLP(gpg0-3, INPUT, DOWN);
0262                 PIN_SLP(gpg0-4, INPUT, DOWN);
0263                 PIN_SLP(gpg0-5, INPUT, DOWN);
0264                 PIN_SLP(gpg0-6, INPUT, DOWN);
0265 
0266                 PIN_SLP(gpg1-0, OUT0, NONE);
0267                 PIN_SLP(gpg1-1, OUT1, NONE);
0268                 PIN_SLP(gpg1-2, PREV, NONE);
0269                 PIN_SLP(gpg1-3, OUT1, NONE);
0270                 PIN_SLP(gpg1-4, OUT1, NONE);
0271                 PIN_SLP(gpg1-5, OUT1, NONE);
0272                 PIN_SLP(gpg1-6, OUT1, NONE);
0273 
0274                 PIN_SLP(gpg2-0, OUT0, NONE);
0275                 PIN_SLP(gpg2-1, OUT0, NONE);
0276                 PIN_SLP(gpg2-2, INPUT, NONE);
0277                 PIN_SLP(gpg2-3, OUT0, NONE);
0278                 PIN_SLP(gpg2-4, OUT0, NONE);
0279                 PIN_SLP(gpg2-5, OUT0, NONE);
0280                 PIN_SLP(gpg2-6, OUT0, NONE);
0281 
0282                 PIN_SLP(gpg3-0, PREV, UP);
0283                 PIN_SLP(gpg3-1, PREV, UP);
0284                 PIN_SLP(gpg3-2, INPUT, NONE);
0285                 PIN_SLP(gpg3-3, INPUT, DOWN);
0286                 PIN_SLP(gpg3-4, OUT0, NONE);
0287                 PIN_SLP(gpg3-5, OUT0, NONE);
0288                 PIN_SLP(gpg3-6, INPUT, DOWN);
0289 
0290                 PIN_SLP(gpi-0, PREV, NONE);
0291                 PIN_SLP(gpi-1, INPUT, DOWN);
0292                 PIN_SLP(gpi-2, PREV, NONE);
0293                 PIN_SLP(gpi-3, PREV, NONE);
0294                 PIN_SLP(gpi-4, PREV, NONE);
0295                 PIN_SLP(gpi-5, INPUT, DOWN);
0296                 PIN_SLP(gpi-6, INPUT, DOWN);
0297 
0298                 PIN_SLP(gpj0-0, INPUT, NONE);
0299                 PIN_SLP(gpj0-1, INPUT, NONE);
0300                 PIN_SLP(gpj0-2, INPUT, NONE);
0301                 PIN_SLP(gpj0-3, INPUT, NONE);
0302                 PIN_SLP(gpj0-4, INPUT, NONE);
0303                 PIN_SLP(gpj0-5, INPUT, DOWN);
0304                 PIN_SLP(gpj0-6, OUT0, NONE);
0305                 PIN_SLP(gpj0-7, INPUT, NONE);
0306 
0307                 PIN_SLP(gpj1-0, OUT1, NONE);
0308                 PIN_SLP(gpj1-1, OUT0, NONE);
0309                 PIN_SLP(gpj1-2, INPUT, DOWN);
0310                 PIN_SLP(gpj1-3, PREV, NONE);
0311                 PIN_SLP(gpj1-4, PREV, NONE);
0312                 PIN_SLP(gpj1-5, OUT0, NONE);
0313 
0314                 PIN_SLP(gpj2-0, INPUT, DOWN);
0315                 PIN_SLP(gpj2-1, INPUT, DOWN);
0316                 PIN_SLP(gpj2-2, OUT0, NONE);
0317                 PIN_SLP(gpj2-3, INPUT, DOWN);
0318                 PIN_SLP(gpj2-4, INPUT, DOWN);
0319                 PIN_SLP(gpj2-5, PREV, NONE);
0320                 PIN_SLP(gpj2-6, PREV, NONE);
0321                 PIN_SLP(gpj2-7, INPUT, DOWN);
0322 
0323                 PIN_SLP(gpj3-0, INPUT, NONE);
0324                 PIN_SLP(gpj3-1, INPUT, NONE);
0325                 PIN_SLP(gpj3-2, OUT0, NONE);
0326                 PIN_SLP(gpj3-3, INPUT, DOWN);
0327                 PIN_SLP(gpj3-4, INPUT, NONE);
0328                 PIN_SLP(gpj3-5, INPUT, NONE);
0329                 PIN_SLP(gpj3-6, INPUT, NONE);
0330                 PIN_SLP(gpj3-7, INPUT, NONE);
0331 
0332                 PIN_SLP(gpj4-0, INPUT, NONE);
0333                 PIN_SLP(gpj4-1, INPUT, DOWN);
0334                 PIN_SLP(gpj4-2, PREV, NONE);
0335                 PIN_SLP(gpj4-3, INPUT, NONE);
0336                 PIN_SLP(gpj4-4, INPUT, DOWN);
0337 
0338                 PIN_SLP(mp01-0, OUT1, NONE);
0339                 PIN_SLP(mp01-1, OUT0, NONE);
0340                 PIN_SLP(mp01-2, INPUT, DOWN);
0341                 PIN_SLP(mp01-3, INPUT, DOWN);
0342                 PIN_SLP(mp01-4, OUT1, NONE);
0343                 PIN_SLP(mp01-5, INPUT, DOWN);
0344                 PIN_SLP(mp01-6, INPUT, DOWN);
0345                 PIN_SLP(mp01-7, INPUT, DOWN);
0346 
0347                 PIN_SLP(mp02-0, INPUT, DOWN);
0348                 PIN_SLP(mp02-1, INPUT, DOWN);
0349                 PIN_SLP(mp02-2, INPUT, NONE);
0350                 PIN_SLP(mp02-3, INPUT, DOWN);
0351 
0352                 PIN_SLP(mp03-0, INPUT, DOWN);
0353                 PIN_SLP(mp03-1, INPUT, DOWN);
0354                 PIN_SLP(mp03-2, OUT1, NONE);
0355                 PIN_SLP(mp03-3, OUT0, NONE);
0356                 PIN_SLP(mp03-4, INPUT, NONE);
0357                 PIN_SLP(mp03-5, OUT0, NONE);
0358                 PIN_SLP(mp03-6, INPUT, DOWN);
0359                 PIN_SLP(mp03-7, INPUT, DOWN);
0360 
0361                 PIN_SLP(mp04-0, INPUT, DOWN);
0362                 PIN_SLP(mp04-1, OUT0, NONE);
0363                 PIN_SLP(mp04-2, INPUT, DOWN);
0364                 PIN_SLP(mp04-3, OUT0, NONE);
0365                 PIN_SLP(mp04-4, INPUT, DOWN);
0366                 PIN_SLP(mp04-5, INPUT, DOWN);
0367                 PIN_SLP(mp04-6, OUT0, NONE);
0368                 PIN_SLP(mp04-7, INPUT, DOWN);
0369 
0370                 PIN_SLP(mp05-0, INPUT, NONE);
0371                 PIN_SLP(mp05-1, INPUT, NONE);
0372                 PIN_SLP(mp05-2, INPUT, NONE);
0373                 PIN_SLP(mp05-3, INPUT, NONE);
0374                 PIN_SLP(mp05-4, INPUT, DOWN);
0375                 PIN_SLP(mp05-5, OUT0, NONE);
0376                 PIN_SLP(mp05-6, INPUT, DOWN);
0377                 PIN_SLP(mp05-7, PREV, NONE);
0378 
0379                 PIN_SLP(mp06-0, INPUT, DOWN);
0380                 PIN_SLP(mp06-1, INPUT, DOWN);
0381                 PIN_SLP(mp06-2, INPUT, DOWN);
0382                 PIN_SLP(mp06-3, INPUT, DOWN);
0383                 PIN_SLP(mp06-4, INPUT, DOWN);
0384                 PIN_SLP(mp06-5, INPUT, DOWN);
0385                 PIN_SLP(mp06-6, INPUT, DOWN);
0386                 PIN_SLP(mp06-7, INPUT, DOWN);
0387 
0388                 PIN_SLP(mp07-0, INPUT, DOWN);
0389                 PIN_SLP(mp07-1, INPUT, DOWN);
0390                 PIN_SLP(mp07-2, INPUT, DOWN);
0391                 PIN_SLP(mp07-3, INPUT, DOWN);
0392                 PIN_SLP(mp07-4, INPUT, DOWN);
0393                 PIN_SLP(mp07-5, INPUT, DOWN);
0394                 PIN_SLP(mp07-6, INPUT, DOWN);
0395                 PIN_SLP(mp07-7, INPUT, DOWN);
0396         };
0397 };
0398 
0399 &wm8994 {
0400         /* GPIO3 (BCLK2) and GPIO4 (LRCLK2) as outputs */
0401         wlf,gpio-cfg = <0xa101 0x8100 0x8100 0x8100 0x8100 0xa101
0402                         0x0100 0x8100 0x0100 0x0100 0x0100>;
0403 };