Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
0004  *
0005  * Author: Robert Nelson <robertcnelson@gmail.com>
0006  */
0007 /dts-v1/;
0008 
0009 #include "am33xx.dtsi"
0010 #include "am335x-osd335x-common.dtsi"
0011 
0012 / {
0013         model = "TI AM335x PocketBeagle";
0014         compatible = "ti,am335x-pocketbeagle", "ti,am335x-bone", "ti,am33xx";
0015 
0016         chosen {
0017                 stdout-path = &uart0;
0018         };
0019 
0020         leds {
0021                 pinctrl-names = "default";
0022                 pinctrl-0 = <&usr_leds_pins>;
0023 
0024                 compatible = "gpio-leds";
0025 
0026                 usr0 {
0027                         label = "beaglebone:green:usr0";
0028                         gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
0029                         linux,default-trigger = "heartbeat";
0030                         default-state = "off";
0031                 };
0032 
0033                 usr1 {
0034                         label = "beaglebone:green:usr1";
0035                         gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
0036                         linux,default-trigger = "mmc0";
0037                         default-state = "off";
0038                 };
0039 
0040                 usr2 {
0041                         label = "beaglebone:green:usr2";
0042                         gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
0043                         linux,default-trigger = "cpu0";
0044                         default-state = "off";
0045                 };
0046 
0047                 usr3 {
0048                         label = "beaglebone:green:usr3";
0049                         gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
0050                         default-state = "off";
0051                 };
0052         };
0053 
0054         vmmcsd_fixed: fixedregulator0 {
0055                 compatible = "regulator-fixed";
0056                 regulator-name = "vmmcsd_fixed";
0057                 regulator-min-microvolt = <3300000>;
0058                 regulator-max-microvolt = <3300000>;
0059         };
0060 };
0061 
0062 &gpio0 {
0063         gpio-line-names =
0064                 "NC",
0065                 "NC",
0066                 "P1.08 [SPI0_CLK]",
0067                 "P1.10 [SPI0_MISO]",
0068                 "P1.12 [SPI0_MOSI]",
0069                 "P1.06 [SPI0_CS]",
0070                 "[MMC0_CD]",
0071                 "P2.29 [SPI1_CLK]",
0072                 "[SYSBOOT 12]",
0073                 "[SYSBOOT 13]",
0074                 "[SYSBOOT 14]",
0075                 "[SYSBOOT 15]",
0076                 "P1.26 [I2C2_SDA]",
0077                 "P1.28 [I2C2_SCL]",
0078                 "P2.11 [I2C1_SDA]",
0079                 "P2.09 [I2C1_SCL]",
0080                 "NC",
0081                 "NC",
0082                 "NC",
0083                 "P2.31 [SPI1_CS]",
0084                 "P1.20 [PRU0.16]",
0085                 "NC",
0086                 "NC",
0087                 "P2.03",
0088                 "NC",
0089                 "NC",
0090                 "P1.34",
0091                 "P2.19",
0092                 "NC",
0093                 "NC",
0094                 "P2.05 [UART4_RX]",
0095                 "P2.07 [UART4_TX]";
0096 };
0097 
0098 &gpio1 {
0099         gpio-line-names =
0100                 "NC",
0101                 "NC",
0102                 "NC",
0103                 "NC",
0104                 "NC",
0105                 "NC",
0106                 "NC",
0107                 "NC",
0108                 "NC",
0109                 "P2.25 [SPI1_MOSI]",
0110                 "P1.32 [UART0_RX]",
0111                 "P1.30 [UART0_TX]",
0112                 "P2.24",
0113                 "P2.33",
0114                 "P2.22",
0115                 "P2.18",
0116                 "NC",
0117                 "NC",
0118                 "P2.01 [PWM1A]",
0119                 "NC",
0120                 "P2.10",
0121                 "[USR LED 0]",
0122                 "[USR LED 1]",
0123                 "[USR LED 2]",
0124                 "[USR LED 3]",
0125                 "P2.06",
0126                 "P2.04",
0127                 "P2.02",
0128                 "P2.08",
0129                 "NC",
0130                 "NC",
0131                 "NC";
0132 };
0133 
0134 &gpio2 {
0135         gpio-line-names =
0136                 "P2.20",
0137                 "P2.17",
0138                 "NC",
0139                 "NC",
0140                 "NC",
0141                 "[EEPROM_WP]",
0142                 "[SYSBOOT 0]",
0143                 "[SYSBOOT 1]",
0144                 "[SYSBOOT 2]",
0145                 "[SYSBOOT 3]",
0146                 "[SYSBOOT 4]",
0147                 "[SYSBOOT 5]",
0148                 "[SYSBOOT 6]",
0149                 "[SYSBOOT 7]",
0150                 "[SYSBOOT 8]",
0151                 "[SYSBOOT 9]",
0152                 "[SYSBOOT 10]",
0153                 "[SYSBOOT 11]",
0154                 "NC",
0155                 "NC",
0156                 "NC",
0157                 "NC",
0158                 "P2.35 [AIN5]",
0159                 "P1.02 [AIN6]",
0160                 "P1.35 [PRU1.10]",
0161                 "P1.04 [PRU1.11]",
0162                 "[MMC0_DAT3]",
0163                 "[MMC0_DAT2]",
0164                 "[MMC0_DAT1]",
0165                 "[MMC0_DAT0]",
0166                 "[MMC0_CLK]",
0167                 "[MMC0_CMD]";
0168 };
0169 
0170 &gpio3 {
0171         gpio-line-names =
0172                 "NC",
0173                 "NC",
0174                 "NC",
0175                 "NC",
0176                 "NC",
0177                 "[I2C0_SDA]",
0178                 "[I2C0_SCL]",
0179                 "[JTAG EMU0]",
0180                 "[JTAG EMU1]",
0181                 "NC",
0182                 "NC",
0183                 "NC",
0184                 "NC",
0185                 "P1.03 [USB1]",
0186                 "P1.36 [PWM0A]",
0187                 "P1.33 [PRU0.1]",
0188                 "P2.32 [PRU0.2]",
0189                 "P2.30 [PRU0.3]",
0190                 "P1.31 [PRU0.4]",
0191                 "P2.34 [PRU0.5]",
0192                 "P2.28 [PRU0.6]",
0193                 "P1.29 [PRU0.7]",
0194                 "NC",
0195                 "NC",
0196                 "NC",
0197                 "NC",
0198                 "NC",
0199                 "NC",
0200                 "NC",
0201                 "NC",
0202                 "NC",
0203                 "NC";
0204 };
0205 
0206 &am33xx_pinmux {
0207 
0208         compatible = "pinconf-single";
0209         pinctrl-names = "default";
0210 
0211         pinctrl-0 =   < &P2_03_gpio &P1_34_gpio &P2_19_gpio &P2_24_gpio
0212                         &P2_33_gpio &P2_22_gpio &P2_18_gpio &P2_10_gpio
0213                         &P2_06_gpio &P2_04_gpio &P2_02_gpio &P2_08_gpio
0214                         &P2_17_gpio >;
0215 
0216         /* P2_03 (ZCZ ball T10) gpio0_23 0x824 PIN 9 */
0217         P2_03_gpio: pinmux_P2_03_gpio {
0218                 pinctrl-single,pins = <
0219                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD9, PIN_INPUT_PULLUP, MUX_MODE7)
0220                 >;
0221                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0222                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0223         };
0224 
0225         /* P1_34 (ZCZ ball T11) gpio0_26 0x828 PIN 10 */
0226         P1_34_gpio: pinmux_P1_34_gpio {
0227                 pinctrl-single,pins = <
0228                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD10, PIN_INPUT_PULLUP, MUX_MODE7)
0229                 >;
0230                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0231                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0232         };
0233 
0234         /* P2_19 (ZCZ ball U12) gpio0_27 0x82c PIN 11 */
0235         P2_19_gpio: pinmux_P2_19_gpio {
0236                 pinctrl-single,pins = <
0237                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD11, PIN_INPUT_PULLUP, MUX_MODE7)
0238                 >;
0239                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0240                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0241         };
0242 
0243         /* P2_24 (ZCZ ball T12) gpio1_12 0x830 PIN 12 */
0244         P2_24_gpio: pinmux_P2_24_gpio {
0245                 pinctrl-single,pins = <
0246                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT_PULLUP, MUX_MODE7)
0247                 >;
0248                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0249                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0250         };
0251 
0252         /* P2_33 (ZCZ ball R12) gpio1_13 0x834 PIN 13 */
0253         P2_33_gpio: pinmux_P2_33_gpio {
0254                 pinctrl-single,pins = <
0255                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLUP, MUX_MODE7)
0256                 >;
0257                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0258                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0259         };
0260 
0261         /* P2_22 (ZCZ ball V13) gpio1_14 0x838 PIN 14 */
0262         P2_22_gpio: pinmux_P2_22_gpio {
0263                 pinctrl-single,pins = <
0264                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLUP, MUX_MODE7)
0265                 >;
0266                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0267                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0268         };
0269 
0270         /* P2_18 (ZCZ ball U13) gpio1_15 0x83c PIN 15 */
0271         P2_18_gpio: pinmux_P2_18_gpio {
0272                 pinctrl-single,pins = <
0273                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE7)
0274                 >;
0275                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0276                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0277         };
0278 
0279         /* P2_10 (ZCZ ball R14) gpio1_20 0x850 PIN 20 */
0280         P2_10_gpio: pinmux_P2_10_gpio {
0281                 pinctrl-single,pins = <
0282                         AM33XX_PADCONF(AM335X_PIN_GPMC_A4, PIN_INPUT_PULLUP, MUX_MODE7)
0283                 >;
0284                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0285                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0286         };
0287 
0288         /* P2_06 (ZCZ ball U16) gpio1_25 0x864 PIN 25 */
0289         P2_06_gpio: pinmux_P2_06_gpio {
0290                 pinctrl-single,pins = <
0291                         AM33XX_PADCONF(AM335X_PIN_GPMC_A9, PIN_INPUT_PULLUP, MUX_MODE7)
0292                 >;
0293                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0294                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0295         };
0296 
0297         /* P2_04 (ZCZ ball T16) gpio1_26 0x868 PIN 26 */
0298         P2_04_gpio: pinmux_P2_04_gpio {
0299                 pinctrl-single,pins = <
0300                         AM33XX_PADCONF(AM335X_PIN_GPMC_A10, PIN_INPUT_PULLUP, MUX_MODE7)
0301                 >;
0302                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0303                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0304         };
0305 
0306         /* P2_02 (ZCZ ball V17) gpio1_27 0x86c PIN 27 */
0307         P2_02_gpio: pinmux_P2_02_gpio {
0308                 pinctrl-single,pins = <
0309                         AM33XX_PADCONF(AM335X_PIN_GPMC_A11, PIN_INPUT_PULLUP, MUX_MODE7)
0310                 >;
0311                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0312                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0313         };
0314 
0315         /* P2_08 (ZCZ ball U18) gpio1_28 0x878 PIN 30 */
0316         P2_08_gpio: pinmux_P2_08_gpio {
0317                 pinctrl-single,pins = <
0318                         AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_INPUT_PULLDOWN, MUX_MODE7)
0319                 >;
0320                 pinctrl-single,bias-pullup   =   < 0x00  0x10  0x00  0x18>;
0321                 pinctrl-single,bias-pulldown   = < 0x00  0x00  0x10  0x18>;
0322         };
0323 
0324         /* P2_17 (ZCZ ball V12) gpio2_1 0x88c PIN 35 */
0325         P2_17_gpio: pinmux_P2_17_gpio {
0326                 pinctrl-single,pins = <
0327                         AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLUP, MUX_MODE7)
0328                 >;
0329                 pinctrl-single,bias-pullup   =   < 0x10  0x10  0x00  0x18>;
0330                 pinctrl-single,bias-pulldown   = < 0x10  0x00  0x10  0x18>;
0331         };
0332 
0333         i2c2_pins: pinmux-i2c2-pins {
0334                 pinctrl-single,pins = <
0335                         AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLUP, MUX_MODE3)      /* (D17) uart1_rtsn.I2C2_SCL */
0336                         AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLUP, MUX_MODE3)      /* (D18) uart1_ctsn.I2C2_SDA */
0337                 >;
0338         };
0339 
0340         ehrpwm0_pins: pinmux-ehrpwm0-pins {
0341                 pinctrl-single,pins = <
0342                         AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKX, PIN_OUTPUT_PULLDOWN, MUX_MODE1) /* (A13) mcasp0_aclkx.ehrpwm0A */
0343                 >;
0344         };
0345 
0346         ehrpwm1_pins: pinmux-ehrpwm1-pins {
0347                 pinctrl-single,pins = <
0348                         AM33XX_PADCONF(AM335X_PIN_GPMC_A2, PIN_OUTPUT_PULLDOWN, MUX_MODE6)      /* (U14) gpmc_a2.ehrpwm1A */
0349                 >;
0350         };
0351 
0352         mmc0_pins: pinmux-mmc0-pins {
0353                 pinctrl-single,pins = <
0354                         AM33XX_PADCONF(AM335X_PIN_SPI0_CS1, PIN_INPUT, MUX_MODE7)               /* (C15) spi0_cs1.gpio0[6] */
0355                         AM33XX_PADCONF(AM335X_PIN_MMC0_DAT0, PIN_INPUT_PULLUP, MUX_MODE0)
0356                         AM33XX_PADCONF(AM335X_PIN_MMC0_DAT1, PIN_INPUT_PULLUP, MUX_MODE0)
0357                         AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT_PULLUP, MUX_MODE0)
0358                         AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT_PULLUP, MUX_MODE0)
0359                         AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT_PULLUP, MUX_MODE0)
0360                         AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT_PULLUP, MUX_MODE0)
0361                 >;
0362         };
0363 
0364         spi0_pins: pinmux-spi0-pins {
0365                 pinctrl-single,pins = <
0366                         AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT_PULLUP, MUX_MODE0)
0367                         AM33XX_PADCONF(AM335X_PIN_SPI0_D0, PIN_INPUT_PULLUP, MUX_MODE0)
0368                         AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_INPUT_PULLUP, MUX_MODE0)
0369                         AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_INPUT_PULLUP, MUX_MODE0)
0370                 >;
0371         };
0372 
0373         spi1_pins: pinmux-spi1-pins {
0374                 pinctrl-single,pins = <
0375                         AM33XX_PADCONF(AM335X_PIN_ECAP0_IN_PWM0_OUT, PIN_INPUT_PULLUP, MUX_MODE4)       /* (C18) eCAP0_in_PWM0_out.spi1_sclk */
0376                         AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT_PULLUP, MUX_MODE4)      /* (E18) uart0_ctsn.spi1_d0 */
0377                         AM33XX_PADCONF(AM335X_PIN_UART0_RTSN, PIN_INPUT_PULLUP, MUX_MODE4)      /* (E17) uart0_rtsn.spi1_d1 */
0378                         AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_INPUT_PULLUP, MUX_MODE4)        /* (A15) xdma_event_intr0.spi1_cs1 */
0379                 >;
0380         };
0381 
0382         usr_leds_pins: pinmux-usr-leds-pins {
0383                 pinctrl-single,pins = <
0384                         AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT, MUX_MODE7)               /* (V15) gpmc_a5.gpio1[21] - USR_LED_0 */
0385                         AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_OUTPUT, MUX_MODE7)               /* (U15) gpmc_a6.gpio1[22] - USR_LED_1 */
0386                         AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_OUTPUT, MUX_MODE7)               /* (T15) gpmc_a7.gpio1[23] - USR_LED_2 */
0387                         AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_OUTPUT, MUX_MODE7)               /* (V16) gpmc_a8.gpio1[24] - USR_LED_3 */
0388                 >;
0389         };
0390 
0391         uart0_pins: pinmux-uart0-pins {
0392                 pinctrl-single,pins = <
0393                         AM33XX_PADCONF(AM335X_PIN_UART0_RXD, PIN_INPUT_PULLUP, MUX_MODE0)
0394                         AM33XX_PADCONF(AM335X_PIN_UART0_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
0395                 >;
0396         };
0397 
0398         uart4_pins: pinmux-uart4-pins {
0399                 pinctrl-single,pins = <
0400                         AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT_PULLUP, MUX_MODE6)      /* (T17) gpmc_wait0.uart4_rxd */
0401                         AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_OUTPUT_PULLDOWN, MUX_MODE6)     /* (U17) gpmc_wpn.uart4_txd */
0402                 >;
0403         };
0404 };
0405 
0406 &epwmss0 {
0407         status = "okay";
0408 };
0409 
0410 &ehrpwm0 {
0411         status = "okay";
0412         pinctrl-names = "default";
0413         pinctrl-0 = <&ehrpwm0_pins>;
0414 };
0415 
0416 &epwmss1 {
0417         status = "okay";
0418 };
0419 
0420 &ehrpwm1 {
0421         status = "okay";
0422         pinctrl-names = "default";
0423         pinctrl-0 = <&ehrpwm1_pins>;
0424 };
0425 
0426 &i2c0 {
0427         eeprom: eeprom@50 {
0428                 compatible = "atmel,24c256";
0429                 reg = <0x50>;
0430         };
0431 };
0432 
0433 &i2c2 {
0434         pinctrl-names = "default";
0435         pinctrl-0 = <&i2c2_pins>;
0436 
0437         status = "okay";
0438         clock-frequency = <400000>;
0439 };
0440 
0441 &mmc1 {
0442         status = "okay";
0443         vmmc-supply = <&vmmcsd_fixed>;
0444         bus-width = <4>;
0445         pinctrl-names = "default";
0446         pinctrl-0 = <&mmc0_pins>;
0447         cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
0448 };
0449 
0450 &rtc {
0451         system-power-controller;
0452 };
0453 
0454 &tscadc {
0455         status = "okay";
0456         adc {
0457                 ti,adc-channels = <0 1 2 3 4 5 6 7>;
0458                 ti,chan-step-avg = <16 16 16 16 16 16 16 16>;
0459                 ti,chan-step-opendelay = <0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98>;
0460                 ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0>;
0461         };
0462 };
0463 
0464 &uart0 {
0465         pinctrl-names = "default";
0466         pinctrl-0 = <&uart0_pins>;
0467 
0468         status = "okay";
0469 };
0470 
0471 &uart4 {
0472         pinctrl-names = "default";
0473         pinctrl-0 = <&uart4_pins>;
0474 
0475         status = "okay";
0476 };
0477 
0478 &usb0 {
0479         dr_mode = "otg";
0480 };
0481 
0482 &usb1 {
0483         dr_mode = "host";
0484 };