Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Copyright (C) 2015 CompuLab, Ltd. - http://www.compulab.co.il/
0004  */
0005 
0006 /dts-v1/;
0007 
0008 #include <dt-bindings/pinctrl/am43xx.h>
0009 #include <dt-bindings/gpio/gpio.h>
0010 #include <dt-bindings/interrupt-controller/irq.h>
0011 #include "am4372.dtsi"
0012 
0013 / {
0014         model = "CompuLab CM-T43";
0015         compatible = "compulab,am437x-cm-t43", "ti,am4372", "ti,am43";
0016 
0017         leds {
0018                 compatible = "gpio-leds";
0019 
0020                 ledb {
0021                         label = "cm-t43:green";
0022                         gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
0023                         linux,default-trigger = "heartbeat";
0024                 };
0025         };
0026 
0027         vmmc_3v3: fixedregulator-v3_3 {
0028                 compatible = "regulator-fixed";
0029                 regulator-name = "vmmc_3v3";
0030                 regulator-min-microvolt = <3300000>;
0031                 regulator-max-microvolt = <3300000>;
0032                 regulator-always-on;
0033                 enable-active-high;
0034         };
0035 };
0036 
0037 &am43xx_pinmux {
0038         pinctrl-names = "default";
0039         pinctrl-0 = <&cm_t43_led_pins>;
0040 
0041         cm_t43_led_pins: cm_t43_led_pins {
0042                 pinctrl-single,pins = <
0043                         AM4372_IOPAD(0xa78, MUX_MODE7)
0044                 >;
0045         };
0046 
0047         i2c0_pins: i2c0_pins {
0048                 pinctrl-single,pins = <
0049                         AM4372_IOPAD(0x988, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_sda.i2c0_sda */
0050                         AM4372_IOPAD(0x98c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl.i2c0_scl */
0051                 >;
0052         };
0053 
0054         emmc_pins: emmc_pins {
0055                 pinctrl-single,pins = <
0056                         AM4372_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0 */
0057                         AM4372_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1 */
0058                         AM4372_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2 */
0059                         AM4372_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3 */
0060                         AM4372_IOPAD(0x830, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad12.mmc1_dat4 */
0061                         AM4372_IOPAD(0x834, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad13.mmc1_dat5 */
0062                         AM4372_IOPAD(0x838, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad14.mmc1_dat6 */
0063                         AM4372_IOPAD(0x83c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad15.mmc1_dat7 */
0064                         AM4372_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
0065                         AM4372_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
0066                 >;
0067         };
0068 
0069         spi0_pins: pinmux_spi0_pins {
0070                 pinctrl-single,pins = <
0071                         AM4372_IOPAD(0x950, PIN_INPUT | MUX_MODE0) /* spi0_sclk.spi0_sclk */
0072                         AM4372_IOPAD(0x954, PIN_INPUT | MUX_MODE0) /* spi0_d0.spi0_d0 */
0073                         AM4372_IOPAD(0x958, PIN_OUTPUT | MUX_MODE0) /* spi0_d1.spi0_d1 */
0074                         AM4372_IOPAD(0x95C, PIN_OUTPUT | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
0075                 >;
0076         };
0077 
0078         nand_flash_x8: nand_flash_x8 {
0079                 pinctrl-single,pins = <
0080                         AM4372_IOPAD(0x800, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
0081                         AM4372_IOPAD(0x804, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
0082                         AM4372_IOPAD(0x808, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
0083                         AM4372_IOPAD(0x80c, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
0084                         AM4372_IOPAD(0x810, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
0085                         AM4372_IOPAD(0x814, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
0086                         AM4372_IOPAD(0x818, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
0087                         AM4372_IOPAD(0x81c, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
0088                         AM4372_IOPAD(0x870, PIN_INPUT_PULLUP  | MUX_MODE0)
0089                         AM4372_IOPAD(0x874, PIN_OUTPUT_PULLUP | MUX_MODE0)
0090                         AM4372_IOPAD(0x87c, PIN_OUTPUT_PULLUP | MUX_MODE0)
0091                         AM4372_IOPAD(0x898, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
0092                         AM4372_IOPAD(0x894, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
0093                         AM4372_IOPAD(0x890, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
0094                         AM4372_IOPAD(0x89c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
0095                 >;
0096         };
0097 
0098         cpsw_default: cpsw_default {
0099                 pinctrl-single,pins = <
0100                         /* Slave 1 */
0101                         AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txen.rgmii1_txen */
0102                         AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxdv.rgmii1_rxctl */
0103                         AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_txd3 */
0104                         AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_txd2 */
0105                         AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_txd1 */
0106                         AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_txd0 */
0107                         AM4372_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txclk.rmii1_tclk */
0108                         AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxclk.rmii1_rclk */
0109                         AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rxd3 */
0110                         AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rxd2 */
0111                         AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rxd1 */
0112                         AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rxd0 */
0113                         AM4372_IOPAD(0xa74, MUX_MODE3)
0114                         /* Slave 2 */
0115                         AM4372_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a0.txen */
0116                         AM4372_IOPAD(0x844, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a1.rxctl */
0117                         AM4372_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a2.txd3 */
0118                         AM4372_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a3.txd2 */
0119                         AM4372_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a4.txd1 */
0120                         AM4372_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a5.txd0 */
0121                         AM4372_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a6.tclk */
0122                         AM4372_IOPAD(0x85c, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a7.rclk */
0123                         AM4372_IOPAD(0x860, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a8.rxd3 */
0124                         AM4372_IOPAD(0x864, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a9.rxd2 */
0125                         AM4372_IOPAD(0x868, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a10.rxd1 */
0126                         AM4372_IOPAD(0x86c, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a11.rxd0 */
0127                         AM4372_IOPAD(0xa38, MUX_MODE7)
0128                 >;
0129         };
0130 
0131         davinci_mdio_default: davinci_mdio_default {
0132                 pinctrl-single,pins = <
0133                         /* MDIO */
0134                         AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
0135                         AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
0136                 >;
0137         };
0138 };
0139 
0140 &gpmc {
0141         status = "okay";
0142         pinctrl-names = "default";
0143         pinctrl-0 = <&nand_flash_x8>;
0144         ranges = <0 0 0x08000000 0x1000000>;
0145         nand@0,0 {
0146                 compatible = "ti,omap2-nand";
0147                 reg = <0 0 4>;          /* CS0, offset 0, IO size 4 */
0148                 interrupt-parent = <&gpmc>;
0149                 interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
0150                              <1 IRQ_TYPE_NONE>; /* termcount */
0151                 ti,nand-ecc-opt = "bch8";
0152                 ti,elm-id = <&elm>;
0153 
0154                 nand-bus-width = <8>;
0155                 gpmc,device-width = <1>;
0156                 gpmc,sync-clk-ps = <0>;
0157                 gpmc,cs-on-ns = <0>;
0158                 gpmc,cs-rd-off-ns = <44>;
0159                 gpmc,cs-wr-off-ns = <44>;
0160                 gpmc,adv-on-ns = <6>;
0161                 gpmc,adv-rd-off-ns = <34>;
0162                 gpmc,adv-wr-off-ns = <44>;
0163                 gpmc,we-on-ns = <0>;
0164                 gpmc,we-off-ns = <40>;
0165                 gpmc,oe-on-ns = <0>;
0166                 gpmc,oe-off-ns = <54>;
0167                 gpmc,access-ns = <64>;
0168                 gpmc,rd-cycle-ns = <82>;
0169                 gpmc,wr-cycle-ns = <82>;
0170                 gpmc,bus-turnaround-ns = <0>;
0171                 gpmc,cycle2cycle-delay-ns = <0>;
0172                 gpmc,clk-activation-ns = <0>;
0173                 gpmc,wr-access-ns = <40>;
0174                 gpmc,wr-data-mux-bus-ns = <0>;
0175 
0176                 #address-cells = <1>;
0177                 #size-cells = <1>;
0178                 /* MTD partition table */
0179                 partition@0 {
0180                         label = "kernel";
0181                         reg = <0x0 0x00980000>;
0182                 };
0183                 partition@980000 {
0184                         label = "dtb";
0185                         reg = <0x00980000 0x00080000>;
0186                 };
0187                 partition@a00000 {
0188                         label = "rootfs";
0189                         reg = <0x00a00000 0x0>;
0190                 };
0191         };
0192 };
0193 
0194 &i2c0 {
0195         status = "okay";
0196         pinctrl-names = "default";
0197         pinctrl-0 = <&i2c0_pins>;
0198         clock-frequency = <100000>;
0199 
0200         tps65218: tps65218@24 {
0201                 compatible = "ti,tps65218";
0202                 reg = <0x24>;
0203                 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* NMIn */
0204                 interrupt-parent = <&gic>;
0205                 interrupt-controller;
0206                 #interrupt-cells = <2>;
0207 
0208                 dcdc1: regulator-dcdc1 {
0209                         regulator-name = "vdd_core";
0210                         regulator-min-microvolt = <912000>;
0211                         regulator-max-microvolt = <1144000>;
0212                         regulator-boot-on;
0213                         regulator-always-on;
0214                 };
0215 
0216                 dcdc2: regulator-dcdc2 {
0217                         regulator-name = "vdd_mpu";
0218                         regulator-min-microvolt = <912000>;
0219                         regulator-max-microvolt = <1378000>;
0220                         regulator-boot-on;
0221                         regulator-always-on;
0222                 };
0223 
0224                 dcdc3: regulator-dcdc3 {
0225                         regulator-name = "vdcdc3";
0226                         regulator-suspend-enable;
0227                         regulator-min-microvolt = <1500000>;
0228                         regulator-max-microvolt = <1500000>;
0229                         regulator-boot-on;
0230                         regulator-always-on;
0231                 };
0232 
0233                 dcdc5: regulator-dcdc5 {
0234                         regulator-name = "v1_0bat";
0235                         regulator-min-microvolt = <1000000>;
0236                         regulator-max-microvolt = <1000000>;
0237                         regulator-boot-on;
0238                         regulator-always-on;
0239                 };
0240 
0241                 dcdc6: regulator-dcdc6 {
0242                         regulator-name = "v1_8bat";
0243                         regulator-min-microvolt = <1800000>;
0244                         regulator-max-microvolt = <1800000>;
0245                         regulator-boot-on;
0246                         regulator-always-on;
0247                 };
0248 
0249                 ldo1: regulator-ldo1 {
0250                         regulator-min-microvolt = <1800000>;
0251                         regulator-max-microvolt = <1800000>;
0252                         regulator-boot-on;
0253                         regulator-always-on;
0254                 };
0255         };
0256 
0257         eeprom_module: at24@50 {
0258                 compatible = "atmel,24c02";
0259                 reg = <0x50>;
0260                 pagesize = <16>;
0261         };
0262 };
0263 
0264 &gpio0 {
0265         status = "okay";
0266 };
0267 
0268 &gpio1 {
0269         status = "okay";
0270 };
0271 
0272 &gpio2 {
0273         status = "okay";
0274 };
0275 
0276 &gpio3 {
0277         status = "okay";
0278 };
0279 
0280 &gpio4 {
0281         status = "okay";
0282 };
0283 
0284 &gpio5 {
0285         status = "okay";
0286 };
0287 
0288 &mmc2 {
0289         status = "okay";
0290         pinctrl-names = "default";
0291         pinctrl-0 = <&emmc_pins>;
0292         vmmc-supply = <&vmmc_3v3>;
0293         bus-width = <8>;
0294         non-removable;
0295 };
0296 
0297 &spi0 {
0298         status = "okay";
0299         pinctrl-names = "default";
0300         pinctrl-0 = <&spi0_pins>;
0301         dmas = <&edma 16 0
0302                 &edma 17 0>;
0303         dma-names = "tx0", "rx0";
0304 
0305         flash: flash@0 {
0306                 #address-cells = <1>;
0307                 #size-cells = <1>;
0308                 compatible = "jedec,spi-nor";
0309                 reg = <0>;
0310                 spi-max-frequency = <20000000>;
0311                 partition@0 {
0312                         label = "uboot";
0313                         reg = <0x0 0xc0000>;
0314                 };
0315 
0316                 partition@c0000 {
0317                         label = "uboot environment";
0318                         reg = <0xc0000 0x40000>;
0319                 };
0320 
0321                 partition@100000 {
0322                         label = "reserved";
0323                         reg = <0x100000 0x100000>;
0324                 };
0325         };
0326 };
0327 
0328 &mac_sw {
0329         pinctrl-names = "default";
0330         pinctrl-0 = <&cpsw_default>;
0331         status = "okay";
0332 };
0333 
0334 &davinci_mdio_sw {
0335         pinctrl-names = "default";
0336         pinctrl-0 = <&davinci_mdio_default>;
0337 
0338         ethphy0: ethernet-phy@0 {
0339                 reg = <0>;
0340         };
0341 
0342         ethphy1: ethernet-phy@1 {
0343                 reg = <1>;
0344         };
0345 };
0346 
0347 &cpsw_port1 {
0348         phy-handle = <&ethphy0>;
0349         phy-mode = "rgmii-txid";
0350         ti,dual-emac-pvid = <1>;
0351 };
0352 
0353 &cpsw_port2 {
0354         phy-handle = <&ethphy1>;
0355         phy-mode = "rgmii-txid";
0356         ti,dual-emac-pvid = <2>;
0357 };
0358 
0359 &dwc3_1 {
0360         status = "okay";
0361 };
0362 
0363 &usb2_phy1 {
0364         status = "okay";
0365 };
0366 
0367 &usb1 {
0368         dr_mode = "host";
0369         status = "okay";
0370 };
0371 
0372 &dwc3_2 {
0373         status = "okay";
0374 };
0375 
0376 &usb2_phy2 {
0377         status = "okay";
0378 };
0379 
0380 &usb2 {
0381         dr_mode = "host";
0382         status = "okay";
0383         interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
0384                      <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
0385                      <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
0386         interrupt-names = "peripheral", "host", "otg";
0387 };
0388 
0389 &elm {
0390         status = "okay";
0391 };
0392 
0393 &uart0 {
0394         status = "okay";
0395 };
0396 
0397 &tscadc {
0398         status = "okay";
0399         tsc {
0400                 ti,wires = <4>;
0401                 ti,x-plate-resistance = <200>;
0402                 ti,coordinate-readouts = <5>;
0403                 ti,wire-config = <0x00 0x11 0x22 0x33>;
0404         };
0405 
0406         adc {
0407                 ti,adc-channels = <4 5 6 7>;
0408         };
0409 };
0410 
0411 &cpu {
0412         cpu0-supply = <&dcdc2>;
0413         operating-points = <1000000 1330000>,
0414                            <800000 1260000>,
0415                            <720000 1200000>,
0416                            <600000 1100000>,
0417                            <300000 950000>;
0418 };
0419 
0420 &pruss1_mdio {
0421         status = "disabled";
0422 };