Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'socfpga-dt-updates-for-3.16_v3' of git://git.rocketboards.org/linux-socfpga-next into next/dt

Merge "dts: socfpga: general updates for the socfpga platform" from Dinh
Nguyen:

Mostly DTS additions to the SOCFPGA platform from Steffan Trumtrar, and a
couple of device tree documentation updates/typo fix.

This one does not the GPIO binding patch, as that is pending further
discussion. Also, v3 fixes a rebase artifact and compile tested.

* tag 'socfpga-dt-updates-for-3.16_v3' of git://git.rocketboards.org/linux-socfpga-next:
ARM: socfpga: dts: Add div-reg to the main_pll clocks
ARM: socfpga: dts: add reset-controller
Documentation: dt: reset: move socfpga-reset
Documentation: dt: socfpga: add reset-cells property
ARM: socfpga: dts: Add DTS entries for USB
ARM: socfpga: dts: Remove hard coded clock-frequency property
ARM: socfpga: dts: add eeprom and rtc on i2c0
ARM: socfpga: dts: convert to preprocessor includes
ARM: socfpga: dts: add rtc on i2c0 to socrates
ARM: socfpga: dts: add support for EBV SOCrates
ARM: socfpga: dts: add can0+1
ARM: socfpga: dts: add i2c busses
ARM: socfpga: dts: add remaining interrupts for pdma
ARM: socfpga: dts: fix pdma interrupt

Signed-off-by: Olof Johansson <olof@lixom.net>

+305 -62
+2
Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt Documentation/devicetree/bindings/reset/socfpga-reset.txt
··· 3 3 Required properties: 4 4 - compatible : "altr,rst-mgr" 5 5 - reg : Should contain 1 register ranges(address and length) 6 + - #reset-cells: 1 6 7 7 8 Example: 8 9 rstmgr@ffd05000 { 10 + #reset-cells = <1>; 9 11 compatible = "altr,rst-mgr"; 10 12 reg = <0xffd05000 0x1000>; 11 13 };
+2 -2
Documentation/devicetree/bindings/clock/altr_socfpga.txt
··· 21 21 - fixed-divider : If clocks have a fixed divider value, use this property. 22 22 - clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register 23 23 and the bit index. 24 - - div-reg : For "socfpga-gate-clk", div-reg contains the divider register, bit shift, 25 - and width. 24 + - div-reg : For "socfpga-gate-clk" and "socfpga-periph-clock", div-reg contains 25 + the divider register, bit shift, and width. 26 26 - clk-phase : For the sdmmc_clk, contains the value of the clock phase that controls 27 27 the SDMMC CIU clock. The first value is the clk_sample(smpsel), and the second 28 28 value is the cclk_in_drv(drvsel). The clk-phase is used to enable the correct
+1
arch/arm/boot/dts/Makefile
··· 321 321 dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \ 322 322 socfpga_cyclone5_socdk.dtb \ 323 323 socfpga_cyclone5_sockit.dtb \ 324 + socfpga_cyclone5_socrates.dtb \ 324 325 socfpga_vt.dtb 325 326 dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \ 326 327 spear1340-evb.dtb
+112 -6
arch/arm/boot/dts/socfpga.dtsi
··· 15 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 16 */ 17 17 18 - /include/ "skeleton.dtsi" 18 + #include "skeleton.dtsi" 19 + #include <dt-bindings/reset/altr,rst-mgr.h> 19 20 20 21 / { 21 22 #address-cells = <1>; ··· 76 75 pdma: pdma@ffe01000 { 77 76 compatible = "arm,pl330", "arm,primecell"; 78 77 reg = <0xffe01000 0x1000>; 79 - interrupts = <0 180 4>; 78 + interrupts = <0 104 4>, 79 + <0 105 4>, 80 + <0 106 4>, 81 + <0 107 4>, 82 + <0 108 4>, 83 + <0 109 4>, 84 + <0 110 4>, 85 + <0 111 4>; 80 86 #dma-cells = <1>; 81 87 #dma-channels = <8>; 82 88 #dma-requests = <32>; 83 89 clocks = <&l4_main_clk>; 84 90 clock-names = "apb_pclk"; 85 91 }; 92 + }; 93 + 94 + can0: can@ffc00000 { 95 + compatible = "bosch,d_can"; 96 + reg = <0xffc00000 0x1000>; 97 + interrupts = <0 131 4>, <0 132 4>, <0 133 4>, <0 134 4>; 98 + clocks = <&can0_clk>; 99 + status = "disabled"; 100 + }; 101 + 102 + can1: can@ffc01000 { 103 + compatible = "bosch,d_can"; 104 + reg = <0xffc01000 0x1000>; 105 + interrupts = <0 135 4>, <0 136 4>, <0 137 4>, <0 138 4>; 106 + clocks = <&can1_clk>; 107 + status = "disabled"; 86 108 }; 87 109 88 110 clkmgr@ffd04000 { ··· 148 124 #clock-cells = <0>; 149 125 compatible = "altr,socfpga-perip-clk"; 150 126 clocks = <&main_pll>; 151 - fixed-divider = <2>; 127 + div-reg = <0xe0 0 9>; 152 128 reg = <0x48>; 153 129 }; 154 130 ··· 156 132 #clock-cells = <0>; 157 133 compatible = "altr,socfpga-perip-clk"; 158 134 clocks = <&main_pll>; 159 - fixed-divider = <4>; 135 + div-reg = <0xe4 0 9>; 160 136 reg = <0x4C>; 161 137 }; 162 138 ··· 164 140 #clock-cells = <0>; 165 141 compatible = "altr,socfpga-perip-clk"; 166 142 clocks = <&main_pll>; 167 - fixed-divider = <4>; 143 + div-reg = <0xe8 0 9>; 168 144 reg = <0x50>; 169 145 }; 170 146 ··· 484 460 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ 485 461 clocks = <&emac0_clk>; 486 462 clock-names = "stmmaceth"; 463 + resets = <&rst EMAC0_RESET>; 464 + reset-names = "stmmaceth"; 487 465 status = "disabled"; 488 466 }; 489 467 ··· 498 472 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ 499 473 clocks = <&emac1_clk>; 500 474 clock-names = "stmmaceth"; 475 + resets = <&rst EMAC1_RESET>; 476 + reset-names = "stmmaceth"; 477 + status = "disabled"; 478 + }; 479 + 480 + i2c0: i2c@ffc04000 { 481 + #address-cells = <1>; 482 + #size-cells = <0>; 483 + compatible = "snps,designware-i2c"; 484 + reg = <0xffc04000 0x1000>; 485 + clocks = <&l4_sp_clk>; 486 + interrupts = <0 158 0x4>; 487 + status = "disabled"; 488 + }; 489 + 490 + i2c1: i2c@ffc05000 { 491 + #address-cells = <1>; 492 + #size-cells = <0>; 493 + compatible = "snps,designware-i2c"; 494 + reg = <0xffc05000 0x1000>; 495 + clocks = <&l4_sp_clk>; 496 + interrupts = <0 159 0x4>; 497 + status = "disabled"; 498 + }; 499 + 500 + i2c2: i2c@ffc06000 { 501 + #address-cells = <1>; 502 + #size-cells = <0>; 503 + compatible = "snps,designware-i2c"; 504 + reg = <0xffc06000 0x1000>; 505 + clocks = <&l4_sp_clk>; 506 + interrupts = <0 160 0x4>; 507 + status = "disabled"; 508 + }; 509 + 510 + i2c3: i2c@ffc07000 { 511 + #address-cells = <1>; 512 + #size-cells = <0>; 513 + compatible = "snps,designware-i2c"; 514 + reg = <0xffc07000 0x1000>; 515 + clocks = <&l4_sp_clk>; 516 + interrupts = <0 161 0x4>; 501 517 status = "disabled"; 502 518 }; 503 519 ··· 576 508 compatible = "snps,dw-apb-timer"; 577 509 interrupts = <0 167 4>; 578 510 reg = <0xffc08000 0x1000>; 511 + clocks = <&l4_sp_clk>; 512 + clock-names = "timer"; 579 513 }; 580 514 581 515 timer1: timer1@ffc09000 { 582 516 compatible = "snps,dw-apb-timer"; 583 517 interrupts = <0 168 4>; 584 518 reg = <0xffc09000 0x1000>; 519 + clocks = <&l4_sp_clk>; 520 + clock-names = "timer"; 585 521 }; 586 522 587 523 timer2: timer2@ffd00000 { 588 524 compatible = "snps,dw-apb-timer"; 589 525 interrupts = <0 169 4>; 590 526 reg = <0xffd00000 0x1000>; 527 + clocks = <&osc1>; 528 + clock-names = "timer"; 591 529 }; 592 530 593 531 timer3: timer3@ffd01000 { 594 532 compatible = "snps,dw-apb-timer"; 595 533 interrupts = <0 170 4>; 596 534 reg = <0xffd01000 0x1000>; 535 + clocks = <&osc1>; 536 + clock-names = "timer"; 597 537 }; 598 538 599 539 uart0: serial0@ffc02000 { ··· 610 534 interrupts = <0 162 4>; 611 535 reg-shift = <2>; 612 536 reg-io-width = <4>; 537 + clocks = <&l4_sp_clk>; 613 538 }; 614 539 615 540 uart1: serial1@ffc03000 { ··· 619 542 interrupts = <0 163 4>; 620 543 reg-shift = <2>; 621 544 reg-io-width = <4>; 545 + clocks = <&l4_sp_clk>; 622 546 }; 623 547 624 - rstmgr@ffd05000 { 548 + rst: rstmgr@ffd05000 { 625 549 compatible = "altr,rst-mgr"; 626 550 reg = <0xffd05000 0x1000>; 551 + }; 552 + 553 + usbphy0: usbphy@0 { 554 + #phy-cells = <0>; 555 + compatible = "usb-nop-xceiv"; 556 + status = "okay"; 557 + }; 558 + 559 + usb0: usb@ffb00000 { 560 + compatible = "snps,dwc2"; 561 + reg = <0xffb00000 0xffff>; 562 + interrupts = <0 125 4>; 563 + clocks = <&usb_mp_clk>; 564 + clock-names = "otg"; 565 + phys = <&usbphy0>; 566 + phy-names = "usb2-phy"; 567 + status = "disabled"; 568 + }; 569 + 570 + usb1: usb@ffb40000 { 571 + compatible = "snps,dwc2"; 572 + reg = <0xffb40000 0xffff>; 573 + interrupts = <0 128 4>; 574 + clocks = <&usb_mp_clk>; 575 + clock-names = "otg"; 576 + phys = <&usbphy0>; 577 + phy-names = "usb2-phy"; 578 + status = "disabled"; 627 579 }; 628 580 629 581 sysmgr: sysmgr@ffd08000 {
+1 -25
arch/arm/boot/dts/socfpga_arria5.dtsi
··· 15 15 */ 16 16 17 17 /dts-v1/; 18 - /include/ "socfpga.dtsi" 18 + #include "socfpga.dtsi" 19 19 20 20 / { 21 21 soc { ··· 38 38 }; 39 39 }; 40 40 41 - serial0@ffc02000 { 42 - clock-frequency = <100000000>; 43 - }; 44 - 45 - serial1@ffc03000 { 46 - clock-frequency = <100000000>; 47 - }; 48 - 49 41 sysmgr@ffd08000 { 50 42 cpu1-start-addr = <0xffd080c4>; 51 - }; 52 - 53 - timer0@ffc08000 { 54 - clock-frequency = <100000000>; 55 - }; 56 - 57 - timer1@ffc09000 { 58 - clock-frequency = <100000000>; 59 - }; 60 - 61 - timer2@ffd00000 { 62 - clock-frequency = <25000000>; 63 - }; 64 - 65 - timer3@ffd01000 { 66 - clock-frequency = <25000000>; 67 43 }; 68 44 }; 69 45 };
+20 -1
arch/arm/boot/dts/socfpga_arria5_socdk.dts
··· 15 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 16 */ 17 17 18 - /include/ "socfpga_arria5.dtsi" 18 + #include "socfpga_arria5.dtsi" 19 19 20 20 / { 21 21 model = "Altera SOCFPGA Arria V SoC Development Kit"; ··· 58 58 txc-skew-ps = <2600>; 59 59 rxdv-skew-ps = <0>; 60 60 rxc-skew-ps = <2000>; 61 + }; 62 + 63 + &i2c0 { 64 + status = "okay"; 65 + 66 + eeprom@51 { 67 + compatible = "atmel,24c32"; 68 + reg = <0x51>; 69 + pagesize = <32>; 70 + }; 71 + 72 + rtc@68 { 73 + compatible = "dallas,ds1339"; 74 + reg = <0x68>; 75 + }; 76 + }; 77 + 78 + &usb1 { 79 + status = "okay"; 61 80 };
+1 -25
arch/arm/boot/dts/socfpga_cyclone5.dtsi
··· 16 16 */ 17 17 18 18 /dts-v1/; 19 - /include/ "socfpga.dtsi" 19 + #include "socfpga.dtsi" 20 20 21 21 / { 22 22 soc { ··· 43 43 phy-mode = "rgmii"; 44 44 phy-addr = <0xffffffff>; /* probe for phy addr */ 45 45 status = "okay"; 46 - }; 47 - 48 - timer0@ffc08000 { 49 - clock-frequency = <100000000>; 50 - }; 51 - 52 - timer1@ffc09000 { 53 - clock-frequency = <100000000>; 54 - }; 55 - 56 - timer2@ffd00000 { 57 - clock-frequency = <25000000>; 58 - }; 59 - 60 - timer3@ffd01000 { 61 - clock-frequency = <25000000>; 62 - }; 63 - 64 - serial0@ffc02000 { 65 - clock-frequency = <100000000>; 66 - }; 67 - 68 - serial1@ffc03000 { 69 - clock-frequency = <100000000>; 70 46 }; 71 47 72 48 sysmgr@ffd08000 {
+20 -1
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
··· 15 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 16 */ 17 17 18 - /include/ "socfpga_cyclone5.dtsi" 18 + #include "socfpga_cyclone5.dtsi" 19 19 20 20 / { 21 21 model = "Altera SOCFPGA Cyclone V SoC Development Kit"; ··· 51 51 txc-skew-ps = <2600>; 52 52 rxdv-skew-ps = <0>; 53 53 rxc-skew-ps = <2000>; 54 + }; 55 + 56 + &i2c0 { 57 + status = "okay"; 58 + 59 + eeprom@51 { 60 + compatible = "atmel,24c32"; 61 + reg = <0x51>; 62 + pagesize = <32>; 63 + }; 64 + 65 + rtc@68 { 66 + compatible = "dallas,ds1339"; 67 + reg = <0x68>; 68 + }; 69 + }; 70 + 71 + &usb1 { 72 + status = "okay"; 54 73 };
+5 -1
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
··· 15 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 16 */ 17 17 18 - /include/ "socfpga_cyclone5.dtsi" 18 + #include "socfpga_cyclone5.dtsi" 19 19 20 20 / { 21 21 model = "Terasic SoCkit"; ··· 51 51 txc-skew-ps = <2600>; 52 52 rxdv-skew-ps = <0>; 53 53 rxc-skew-ps = <2000>; 54 + }; 55 + 56 + &usb1 { 57 + status = "okay"; 54 58 };
+50
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
··· 1 + /* 2 + * Copyright (C) 2014 Steffen Trumtrar <s.trumtrar@pengutronix.de> 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + * 9 + * This program is distributed in the hope that it will be useful, 10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 + * GNU General Public License for more details. 13 + * 14 + * You should have received a copy of the GNU General Public License 15 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 + */ 17 + 18 + #include "socfpga_cyclone5.dtsi" 19 + 20 + / { 21 + model = "EBV SOCrates"; 22 + compatible = "ebv,socrates", "altr,socfpga-cyclone5", "altr,socfpga"; 23 + 24 + chosen { 25 + bootargs = "console=ttyS0,115200"; 26 + }; 27 + 28 + memory { 29 + name = "memory"; 30 + device_type = "memory"; 31 + reg = <0x0 0x40000000>; /* 1GB */ 32 + }; 33 + }; 34 + 35 + &gmac1 { 36 + status = "okay"; 37 + }; 38 + 39 + &i2c0 { 40 + status = "okay"; 41 + 42 + rtc: rtc@68 { 43 + compatible = "stm,m41t82"; 44 + reg = <0x68>; 45 + }; 46 + }; 47 + 48 + &mmc { 49 + status = "okay"; 50 + };
+1 -1
arch/arm/boot/dts/socfpga_vt.dts
··· 16 16 */ 17 17 18 18 /dts-v1/; 19 - /include/ "socfpga.dtsi" 19 + #include "socfpga.dtsi" 20 20 21 21 / { 22 22 model = "Altera SOCFPGA VT";
+90
include/dt-bindings/reset/altr,rst-mgr.h
··· 1 + /* 2 + * Copyright (c) 2014, Steffen Trumtrar <s.trumtrar@pengutronix.de> 3 + * 4 + * This software is licensed under the terms of the GNU General Public 5 + * License version 2, as published by the Free Software Foundation, and 6 + * may be copied, distributed, and modified under those terms. 7 + * 8 + * This program is distributed in the hope that it will be useful, 9 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + */ 13 + 14 + #ifndef _DT_BINDINGS_RESET_ALTR_RST_MGR_H 15 + #define _DT_BINDINGS_RESET_ALTR_RST_MGR_H 16 + 17 + /* MPUMODRST */ 18 + #define CPU0_RESET 0 19 + #define CPU1_RESET 1 20 + #define WDS_RESET 2 21 + #define SCUPER_RESET 3 22 + #define L2_RESET 4 23 + 24 + /* PERMODRST */ 25 + #define EMAC0_RESET 32 26 + #define EMAC1_RESET 33 27 + #define USB0_RESET 34 28 + #define USB1_RESET 35 29 + #define NAND_RESET 36 30 + #define QSPI_RESET 37 31 + #define L4WD0_RESET 38 32 + #define L4WD1_RESET 39 33 + #define OSC1TIMER0_RESET 40 34 + #define OSC1TIMER1_RESET 41 35 + #define SPTIMER0_RESET 42 36 + #define SPTIMER1_RESET 43 37 + #define I2C0_RESET 44 38 + #define I2C1_RESET 45 39 + #define I2C2_RESET 46 40 + #define I2C3_RESET 47 41 + #define UART0_RESET 48 42 + #define UART1_RESET 49 43 + #define SPIM0_RESET 50 44 + #define SPIM1_RESET 51 45 + #define SPIS0_RESET 52 46 + #define SPIS1_RESET 53 47 + #define SDMMC_RESET 54 48 + #define CAN0_RESET 55 49 + #define CAN1_RESET 56 50 + #define GPIO0_RESET 57 51 + #define GPIO1_RESET 58 52 + #define GPIO2_RESET 59 53 + #define DMA_RESET 60 54 + #define SDR_RESET 61 55 + 56 + /* PER2MODRST */ 57 + #define DMAIF0_RESET 64 58 + #define DMAIF1_RESET 65 59 + #define DMAIF2_RESET 66 60 + #define DMAIF3_RESET 67 61 + #define DMAIF4_RESET 68 62 + #define DMAIF5_RESET 69 63 + #define DMAIF6_RESET 70 64 + #define DMAIF7_RESET 71 65 + 66 + /* BRGMODRST */ 67 + #define HPS2FPGA_RESET 96 68 + #define LWHPS2FPGA_RESET 97 69 + #define FPGA2HPS_RESET 98 70 + 71 + /* MISCMODRST*/ 72 + #define ROM_RESET 128 73 + #define OCRAM_RESET 129 74 + #define SYSMGR_RESET 130 75 + #define SYSMGRCOLD_RESET 131 76 + #define FPGAMGR_RESET 132 77 + #define ACPIDMAP_RESET 133 78 + #define S2F_RESET 134 79 + #define S2FCOLD_RESET 135 80 + #define NRSTPIN_RESET 136 81 + #define TIMESTAMPCOLD_RESET 137 82 + #define CLKMGRCOLD_RESET 138 83 + #define SCANMGR_RESET 139 84 + #define FRZCTRLCOLD_RESET 140 85 + #define SYSDBG_RESET 141 86 + #define DBG_RESET 142 87 + #define TAPCOLD_RESET 143 88 + #define SDRCOLD_RESET 144 89 + 90 + #endif