diff options
40 files changed, 389 insertions, 1867 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 366362b16f34..a4424f69fe82 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -1036,26 +1036,26 @@ F: drivers/net/appletalk/ | |||
| 1036 | F: net/appletalk/ | 1036 | F: net/appletalk/ |
| 1037 | 1037 | ||
| 1038 | APPLIED MICRO (APM) X-GENE DEVICE TREE SUPPORT | 1038 | APPLIED MICRO (APM) X-GENE DEVICE TREE SUPPORT |
| 1039 | M: Duc Dang <dhdang@apm.com> | 1039 | M: Khuong Dinh <khuong@os.amperecomputing.com> |
| 1040 | S: Supported | 1040 | S: Supported |
| 1041 | F: arch/arm64/boot/dts/apm/ | 1041 | F: arch/arm64/boot/dts/apm/ |
| 1042 | 1042 | ||
| 1043 | APPLIED MICRO (APM) X-GENE SOC EDAC | 1043 | APPLIED MICRO (APM) X-GENE SOC EDAC |
| 1044 | M: Loc Ho <lho@apm.com> | 1044 | M: Khuong Dinh <khuong@os.amperecomputing.com> |
| 1045 | S: Supported | 1045 | S: Supported |
| 1046 | F: drivers/edac/xgene_edac.c | 1046 | F: drivers/edac/xgene_edac.c |
| 1047 | F: Documentation/devicetree/bindings/edac/apm-xgene-edac.txt | 1047 | F: Documentation/devicetree/bindings/edac/apm-xgene-edac.txt |
| 1048 | 1048 | ||
| 1049 | APPLIED MICRO (APM) X-GENE SOC ETHERNET (V2) DRIVER | 1049 | APPLIED MICRO (APM) X-GENE SOC ETHERNET (V2) DRIVER |
| 1050 | M: Iyappan Subramanian <isubramanian@apm.com> | 1050 | M: Iyappan Subramanian <iyappan@os.amperecomputing.com> |
| 1051 | M: Keyur Chudgar <kchudgar@apm.com> | 1051 | M: Keyur Chudgar <keyur@os.amperecomputing.com> |
| 1052 | S: Supported | 1052 | S: Supported |
| 1053 | F: drivers/net/ethernet/apm/xgene-v2/ | 1053 | F: drivers/net/ethernet/apm/xgene-v2/ |
| 1054 | 1054 | ||
| 1055 | APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER | 1055 | APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER |
| 1056 | M: Iyappan Subramanian <isubramanian@apm.com> | 1056 | M: Iyappan Subramanian <iyappan@os.amperecomputing.com> |
| 1057 | M: Keyur Chudgar <kchudgar@apm.com> | 1057 | M: Keyur Chudgar <keyur@os.amperecomputing.com> |
| 1058 | M: Quan Nguyen <qnguyen@apm.com> | 1058 | M: Quan Nguyen <quan@os.amperecomputing.com> |
| 1059 | S: Supported | 1059 | S: Supported |
| 1060 | F: drivers/net/ethernet/apm/xgene/ | 1060 | F: drivers/net/ethernet/apm/xgene/ |
| 1061 | F: drivers/net/phy/mdio-xgene.c | 1061 | F: drivers/net/phy/mdio-xgene.c |
| @@ -1063,7 +1063,7 @@ F: Documentation/devicetree/bindings/net/apm-xgene-enet.txt | |||
| 1063 | F: Documentation/devicetree/bindings/net/apm-xgene-mdio.txt | 1063 | F: Documentation/devicetree/bindings/net/apm-xgene-mdio.txt |
| 1064 | 1064 | ||
| 1065 | APPLIED MICRO (APM) X-GENE SOC PMU | 1065 | APPLIED MICRO (APM) X-GENE SOC PMU |
| 1066 | M: Tai Nguyen <ttnguyen@apm.com> | 1066 | M: Khuong Dinh <khuong@os.amperecomputing.com> |
| 1067 | S: Supported | 1067 | S: Supported |
| 1068 | F: drivers/perf/xgene_pmu.c | 1068 | F: drivers/perf/xgene_pmu.c |
| 1069 | F: Documentation/perf/xgene-pmu.txt | 1069 | F: Documentation/perf/xgene-pmu.txt |
| @@ -1530,21 +1530,14 @@ ARM/FREESCALE IMX / MXC ARM ARCHITECTURE | |||
| 1530 | M: Shawn Guo <shawnguo@kernel.org> | 1530 | M: Shawn Guo <shawnguo@kernel.org> |
| 1531 | M: Sascha Hauer <s.hauer@pengutronix.de> | 1531 | M: Sascha Hauer <s.hauer@pengutronix.de> |
| 1532 | R: Pengutronix Kernel Team <kernel@pengutronix.de> | 1532 | R: Pengutronix Kernel Team <kernel@pengutronix.de> |
| 1533 | R: Fabio Estevam <fabio.estevam@nxp.com> | 1533 | R: Fabio Estevam <festevam@gmail.com> |
| 1534 | R: NXP Linux Team <linux-imx@nxp.com> | 1534 | R: NXP Linux Team <linux-imx@nxp.com> |
| 1535 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1535 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 1536 | S: Maintained | 1536 | S: Maintained |
| 1537 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git | 1537 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git |
| 1538 | F: arch/arm/mach-imx/ | 1538 | N: imx |
| 1539 | F: arch/arm/mach-mxs/ | 1539 | N: mxs |
| 1540 | F: arch/arm/boot/dts/imx* | 1540 | X: drivers/media/i2c/ |
| 1541 | F: arch/arm/configs/imx*_defconfig | ||
| 1542 | F: arch/arm64/boot/dts/freescale/imx* | ||
| 1543 | F: drivers/clk/imx/ | ||
| 1544 | F: drivers/firmware/imx/ | ||
| 1545 | F: drivers/soc/imx/ | ||
| 1546 | F: include/linux/firmware/imx/ | ||
| 1547 | F: include/soc/imx/ | ||
| 1548 | 1541 | ||
| 1549 | ARM/FREESCALE VYBRID ARM ARCHITECTURE | 1542 | ARM/FREESCALE VYBRID ARM ARCHITECTURE |
| 1550 | M: Shawn Guo <shawnguo@kernel.org> | 1543 | M: Shawn Guo <shawnguo@kernel.org> |
| @@ -2108,6 +2101,8 @@ Q: http://patchwork.kernel.org/project/linux-renesas-soc/list/ | |||
| 2108 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next | 2101 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next |
| 2109 | S: Supported | 2102 | S: Supported |
| 2110 | F: arch/arm/boot/dts/emev2* | 2103 | F: arch/arm/boot/dts/emev2* |
| 2104 | F: arch/arm/boot/dts/gr-peach* | ||
| 2105 | F: arch/arm/boot/dts/iwg20d-q7* | ||
| 2111 | F: arch/arm/boot/dts/r7s* | 2106 | F: arch/arm/boot/dts/r7s* |
| 2112 | F: arch/arm/boot/dts/r8a* | 2107 | F: arch/arm/boot/dts/r8a* |
| 2113 | F: arch/arm/boot/dts/r9a* | 2108 | F: arch/arm/boot/dts/r9a* |
| @@ -9888,6 +9883,11 @@ S: Maintained | |||
| 9888 | F: drivers/mtd/nand/raw/meson_* | 9883 | F: drivers/mtd/nand/raw/meson_* |
| 9889 | F: Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt | 9884 | F: Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt |
| 9890 | 9885 | ||
| 9886 | METHODE UDPU SUPPORT | ||
| 9887 | M: Vladimir Vid <vladimir.vid@sartura.hr> | ||
| 9888 | S: Maintained | ||
| 9889 | F: arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | ||
| 9890 | |||
| 9891 | MICROBLAZE ARCHITECTURE | 9891 | MICROBLAZE ARCHITECTURE |
| 9892 | M: Michal Simek <monstr@monstr.eu> | 9892 | M: Michal Simek <monstr@monstr.eu> |
| 9893 | W: http://www.monstr.eu/fdt/ | 9893 | W: http://www.monstr.eu/fdt/ |
| @@ -11613,7 +11613,7 @@ F: Documentation/devicetree/bindings/pci/altera-pcie.txt | |||
| 11613 | F: drivers/pci/controller/pcie-altera.c | 11613 | F: drivers/pci/controller/pcie-altera.c |
| 11614 | 11614 | ||
| 11615 | PCI DRIVER FOR APPLIEDMICRO XGENE | 11615 | PCI DRIVER FOR APPLIEDMICRO XGENE |
| 11616 | M: Tanmay Inamdar <tinamdar@apm.com> | 11616 | M: Toan Le <toan@os.amperecomputing.com> |
| 11617 | L: linux-pci@vger.kernel.org | 11617 | L: linux-pci@vger.kernel.org |
| 11618 | L: linux-arm-kernel@lists.infradead.org | 11618 | L: linux-arm-kernel@lists.infradead.org |
| 11619 | S: Maintained | 11619 | S: Maintained |
| @@ -11791,7 +11791,7 @@ F: Documentation/devicetree/bindings/pci/altera-pcie-msi.txt | |||
| 11791 | F: drivers/pci/controller/pcie-altera-msi.c | 11791 | F: drivers/pci/controller/pcie-altera-msi.c |
| 11792 | 11792 | ||
| 11793 | PCI MSI DRIVER FOR APPLIEDMICRO XGENE | 11793 | PCI MSI DRIVER FOR APPLIEDMICRO XGENE |
| 11794 | M: Duc Dang <dhdang@apm.com> | 11794 | M: Toan Le <toan@os.amperecomputing.com> |
| 11795 | L: linux-pci@vger.kernel.org | 11795 | L: linux-pci@vger.kernel.org |
| 11796 | L: linux-arm-kernel@lists.infradead.org | 11796 | L: linux-arm-kernel@lists.infradead.org |
| 11797 | S: Maintained | 11797 | S: Maintained |
| @@ -14759,7 +14759,7 @@ S: Maintained | |||
| 14759 | F: drivers/tty/serial/8250/8250_dw.c | 14759 | F: drivers/tty/serial/8250/8250_dw.c |
| 14760 | 14760 | ||
| 14761 | SYNOPSYS DESIGNWARE APB GPIO DRIVER | 14761 | SYNOPSYS DESIGNWARE APB GPIO DRIVER |
| 14762 | M: Hoan Tran <hotran@apm.com> | 14762 | M: Hoan Tran <hoan@os.amperecomputing.com> |
| 14763 | L: linux-gpio@vger.kernel.org | 14763 | L: linux-gpio@vger.kernel.org |
| 14764 | S: Maintained | 14764 | S: Maintained |
| 14765 | F: drivers/gpio/gpio-dwapb.c | 14765 | F: drivers/gpio/gpio-dwapb.c |
diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig index 6bb506edb1f5..e96a9743b220 100644 --- a/arch/arm/configs/pxa_defconfig +++ b/arch/arm/configs/pxa_defconfig | |||
| @@ -66,9 +66,6 @@ CONFIG_MACH_MIOA701=y | |||
| 66 | CONFIG_PXA_EZX=y | 66 | CONFIG_PXA_EZX=y |
| 67 | CONFIG_MACH_MP900C=y | 67 | CONFIG_MACH_MP900C=y |
| 68 | CONFIG_ARCH_PXA_PALM=y | 68 | CONFIG_ARCH_PXA_PALM=y |
| 69 | CONFIG_MACH_RAUMFELD_RC=y | ||
| 70 | CONFIG_MACH_RAUMFELD_CONNECTOR=y | ||
| 71 | CONFIG_MACH_RAUMFELD_SPEAKER=y | ||
| 72 | CONFIG_PXA_SHARPSL=y | 69 | CONFIG_PXA_SHARPSL=y |
| 73 | CONFIG_MACH_POODLE=y | 70 | CONFIG_MACH_POODLE=y |
| 74 | CONFIG_MACH_CORGI=y | 71 | CONFIG_MACH_CORGI=y |
| @@ -498,7 +495,6 @@ CONFIG_SND_PXA2XX_SOC_E800=m | |||
| 498 | CONFIG_SND_PXA2XX_SOC_EM_X270=m | 495 | CONFIG_SND_PXA2XX_SOC_EM_X270=m |
| 499 | CONFIG_SND_PXA2XX_SOC_PALM27X=y | 496 | CONFIG_SND_PXA2XX_SOC_PALM27X=y |
| 500 | CONFIG_SND_SOC_ZYLONITE=m | 497 | CONFIG_SND_SOC_ZYLONITE=m |
| 501 | CONFIG_SND_SOC_RAUMFELD=m | ||
| 502 | CONFIG_SND_PXA2XX_SOC_HX4700=m | 498 | CONFIG_SND_PXA2XX_SOC_HX4700=m |
| 503 | CONFIG_SND_PXA2XX_SOC_MAGICIAN=m | 499 | CONFIG_SND_PXA2XX_SOC_MAGICIAN=m |
| 504 | CONFIG_SND_PXA2XX_SOC_MIOA701=m | 500 | CONFIG_SND_PXA2XX_SOC_MIOA701=m |
diff --git a/arch/arm/configs/raumfeld_defconfig b/arch/arm/configs/raumfeld_defconfig deleted file mode 100644 index 2dd56e9a484e..000000000000 --- a/arch/arm/configs/raumfeld_defconfig +++ /dev/null | |||
| @@ -1,197 +0,0 @@ | |||
| 1 | # CONFIG_LOCALVERSION_AUTO is not set | ||
| 2 | # CONFIG_SWAP is not set | ||
| 3 | CONFIG_MODULES=y | ||
| 4 | CONFIG_MODULE_UNLOAD=y | ||
| 5 | # CONFIG_LBDAF is not set | ||
| 6 | # CONFIG_BLK_DEV_BSG is not set | ||
| 7 | CONFIG_ARCH_PXA=y | ||
| 8 | CONFIG_MACH_RAUMFELD_RC=y | ||
| 9 | CONFIG_MACH_RAUMFELD_CONNECTOR=y | ||
| 10 | CONFIG_MACH_RAUMFELD_SPEAKER=y | ||
| 11 | CONFIG_NO_HZ=y | ||
| 12 | CONFIG_AEABI=y | ||
| 13 | # CONFIG_OABI_COMPAT is not set | ||
| 14 | CONFIG_CMDLINE="console=ttyS0,115200 rw" | ||
| 15 | CONFIG_CPU_FREQ=y | ||
| 16 | CONFIG_CPU_IDLE=y | ||
| 17 | CONFIG_PM=y | ||
| 18 | CONFIG_APM_EMULATION=y | ||
| 19 | CONFIG_NET=y | ||
| 20 | CONFIG_PACKET=y | ||
| 21 | CONFIG_UNIX=y | ||
| 22 | CONFIG_INET=y | ||
| 23 | CONFIG_IP_MULTICAST=y | ||
| 24 | CONFIG_IP_PNP=y | ||
| 25 | CONFIG_SYN_COOKIES=y | ||
| 26 | CONFIG_IPV6=y | ||
| 27 | CONFIG_CFG80211=y | ||
| 28 | CONFIG_MAC80211=y | ||
| 29 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 30 | CONFIG_MTD=y | ||
| 31 | CONFIG_MTD_BLOCK=y | ||
| 32 | CONFIG_NFTL=y | ||
| 33 | CONFIG_NFTL_RW=y | ||
| 34 | CONFIG_MTD_BLOCK2MTD=y | ||
| 35 | CONFIG_MTD_NAND=y | ||
| 36 | CONFIG_MTD_NAND_MARVELL=y | ||
| 37 | CONFIG_MTD_UBI=y | ||
| 38 | CONFIG_BLK_DEV_LOOP=y | ||
| 39 | CONFIG_ISL29003=y | ||
| 40 | CONFIG_IIO=y | ||
| 41 | CONFIG_AD5446=y | ||
| 42 | CONFIG_SCSI=y | ||
| 43 | CONFIG_BLK_DEV_SD=y | ||
| 44 | CONFIG_CHR_DEV_SG=y | ||
| 45 | CONFIG_NETDEVICES=y | ||
| 46 | CONFIG_NET_ETHERNET=y | ||
| 47 | CONFIG_SMSC911X=y | ||
| 48 | CONFIG_LIBERTAS=y | ||
| 49 | CONFIG_LIBERTAS_SDIO=m | ||
| 50 | CONFIG_USB_USBNET=y | ||
| 51 | # CONFIG_USB_NET_AX8817X is not set | ||
| 52 | # CONFIG_USB_NET_NET1080 is not set | ||
| 53 | CONFIG_USB_NET_MCS7830=y | ||
| 54 | # CONFIG_USB_NET_CDC_SUBSET is not set | ||
| 55 | # CONFIG_USB_NET_ZAURUS is not set | ||
| 56 | CONFIG_INPUT_EVDEV=y | ||
| 57 | CONFIG_KEYBOARD_GPIO=y | ||
| 58 | # CONFIG_INPUT_MOUSE is not set | ||
| 59 | CONFIG_INPUT_TOUCHSCREEN=y | ||
| 60 | CONFIG_TOUCHSCREEN_EETI=m | ||
| 61 | CONFIG_INPUT_MISC=y | ||
| 62 | CONFIG_INPUT_GPIO_ROTARY_ENCODER=y | ||
| 63 | CONFIG_SERIAL_PXA=y | ||
| 64 | CONFIG_SERIAL_PXA_CONSOLE=y | ||
| 65 | CONFIG_HW_RANDOM=y | ||
| 66 | CONFIG_I2C=y | ||
| 67 | CONFIG_I2C_CHARDEV=y | ||
| 68 | CONFIG_I2C_PXA=y | ||
| 69 | CONFIG_SPI=y | ||
| 70 | CONFIG_SPI_DEBUG=y | ||
| 71 | CONFIG_SPI_GPIO=y | ||
| 72 | CONFIG_SPI_SPIDEV=y | ||
| 73 | CONFIG_DEBUG_GPIO=y | ||
| 74 | CONFIG_W1_MASTER_GPIO=m | ||
| 75 | CONFIG_POWER_SUPPLY=y | ||
| 76 | CONFIG_PDA_POWER=y | ||
| 77 | CONFIG_BATTERY_DS2760=m | ||
| 78 | CONFIG_SENSORS_LIS3_SPI=y | ||
| 79 | CONFIG_REGULATOR=y | ||
| 80 | CONFIG_REGULATOR_DEBUG=y | ||
| 81 | CONFIG_REGULATOR_FIXED_VOLTAGE=y | ||
| 82 | CONFIG_REGULATOR_MAX8660=y | ||
| 83 | CONFIG_FB=y | ||
| 84 | CONFIG_FB_PXA=y | ||
| 85 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
| 86 | # CONFIG_LCD_CLASS_DEVICE is not set | ||
| 87 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
| 88 | # CONFIG_BACKLIGHT_GENERIC is not set | ||
| 89 | CONFIG_BACKLIGHT_PWM=y | ||
| 90 | # CONFIG_VGA_CONSOLE is not set | ||
| 91 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
| 92 | CONFIG_LOGO=y | ||
| 93 | # CONFIG_LOGO_LINUX_MONO is not set | ||
| 94 | # CONFIG_LOGO_LINUX_VGA16 is not set | ||
| 95 | # CONFIG_LOGO_LINUX_CLUT224 is not set | ||
| 96 | CONFIG_SOUND=y | ||
| 97 | CONFIG_SND=y | ||
| 98 | # CONFIG_SND_DRIVERS is not set | ||
| 99 | # CONFIG_SND_USB is not set | ||
| 100 | CONFIG_SND_SOC=y | ||
| 101 | CONFIG_SND_PXA2XX_SOC=y | ||
| 102 | CONFIG_SND_SOC_RAUMFELD=y | ||
| 103 | CONFIG_HID_DRAGONRISE=y | ||
| 104 | CONFIG_HID_GYRATION=y | ||
| 105 | CONFIG_HID_TWINHAN=y | ||
| 106 | CONFIG_HID_NTRIG=y | ||
| 107 | CONFIG_HID_PANTHERLORD=y | ||
| 108 | CONFIG_HID_PETALYNX=y | ||
| 109 | CONFIG_HID_SAMSUNG=y | ||
| 110 | CONFIG_HID_SONY=y | ||
| 111 | CONFIG_HID_SUNPLUS=y | ||
| 112 | CONFIG_HID_GREENASIA=y | ||
| 113 | CONFIG_HID_SMARTJOYPLUS=y | ||
| 114 | CONFIG_HID_TOPSEED=y | ||
| 115 | CONFIG_HID_THRUSTMASTER=y | ||
| 116 | CONFIG_HID_ZEROPLUS=y | ||
| 117 | CONFIG_USB=y | ||
| 118 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | ||
| 119 | CONFIG_USB_MON=y | ||
| 120 | CONFIG_USB_OHCI_HCD=y | ||
| 121 | CONFIG_USB_STORAGE=y | ||
| 122 | CONFIG_USB_STORAGE_FREECOM=y | ||
| 123 | CONFIG_USB_STORAGE_ISD200=y | ||
| 124 | CONFIG_USB_STORAGE_USBAT=y | ||
| 125 | CONFIG_USB_STORAGE_SDDR09=y | ||
| 126 | CONFIG_USB_STORAGE_SDDR55=y | ||
| 127 | CONFIG_MMC=y | ||
| 128 | CONFIG_MMC_PXA=m | ||
| 129 | CONFIG_NEW_LEDS=y | ||
| 130 | CONFIG_LEDS_CLASS=y | ||
| 131 | CONFIG_LEDS_GPIO=y | ||
| 132 | CONFIG_LEDS_LT3593=y | ||
| 133 | CONFIG_LEDS_TRIGGERS=y | ||
| 134 | CONFIG_LEDS_TRIGGER_BACKLIGHT=y | ||
| 135 | CONFIG_RTC_CLASS=y | ||
| 136 | CONFIG_RTC_DRV_PXA=y | ||
| 137 | CONFIG_DMADEVICES=y | ||
| 138 | CONFIG_UIO=y | ||
| 139 | CONFIG_EXT2_FS=y | ||
| 140 | CONFIG_EXT2_FS_XIP=y | ||
| 141 | CONFIG_EXT3_FS=y | ||
| 142 | CONFIG_FSCACHE=y | ||
| 143 | CONFIG_FSCACHE_STATS=y | ||
| 144 | CONFIG_CACHEFILES=y | ||
| 145 | CONFIG_MSDOS_FS=y | ||
| 146 | CONFIG_VFAT_FS=y | ||
| 147 | CONFIG_TMPFS=y | ||
| 148 | CONFIG_UBIFS_FS=y | ||
| 149 | CONFIG_NFS_FS=y | ||
| 150 | CONFIG_NFS_V3=y | ||
| 151 | CONFIG_ROOT_NFS=y | ||
| 152 | CONFIG_NFS_FSCACHE=y | ||
| 153 | CONFIG_NLS_CODEPAGE_437=y | ||
| 154 | CONFIG_NLS_CODEPAGE_737=y | ||
| 155 | CONFIG_NLS_CODEPAGE_775=y | ||
| 156 | CONFIG_NLS_CODEPAGE_850=y | ||
| 157 | CONFIG_NLS_CODEPAGE_852=y | ||
| 158 | CONFIG_NLS_CODEPAGE_855=y | ||
| 159 | CONFIG_NLS_CODEPAGE_857=y | ||
| 160 | CONFIG_NLS_CODEPAGE_860=y | ||
| 161 | CONFIG_NLS_CODEPAGE_861=y | ||
| 162 | CONFIG_NLS_CODEPAGE_862=y | ||
| 163 | CONFIG_NLS_CODEPAGE_863=y | ||
| 164 | CONFIG_NLS_CODEPAGE_864=y | ||
| 165 | CONFIG_NLS_CODEPAGE_865=y | ||
| 166 | CONFIG_NLS_CODEPAGE_866=y | ||
| 167 | CONFIG_NLS_CODEPAGE_869=y | ||
| 168 | CONFIG_NLS_CODEPAGE_936=y | ||
| 169 | CONFIG_NLS_CODEPAGE_950=y | ||
| 170 | CONFIG_NLS_CODEPAGE_932=y | ||
| 171 | CONFIG_NLS_CODEPAGE_949=y | ||
| 172 | CONFIG_NLS_CODEPAGE_874=y | ||
| 173 | CONFIG_NLS_ISO8859_8=y | ||
| 174 | CONFIG_NLS_CODEPAGE_1250=y | ||
| 175 | CONFIG_NLS_CODEPAGE_1251=y | ||
| 176 | CONFIG_NLS_ASCII=y | ||
| 177 | CONFIG_NLS_ISO8859_1=y | ||
| 178 | CONFIG_NLS_ISO8859_2=y | ||
| 179 | CONFIG_NLS_ISO8859_3=y | ||
| 180 | CONFIG_NLS_ISO8859_4=y | ||
| 181 | CONFIG_NLS_ISO8859_5=y | ||
| 182 | CONFIG_NLS_ISO8859_6=y | ||
| 183 | CONFIG_NLS_ISO8859_7=y | ||
| 184 | CONFIG_NLS_ISO8859_9=y | ||
| 185 | CONFIG_NLS_ISO8859_13=y | ||
| 186 | CONFIG_NLS_ISO8859_14=y | ||
| 187 | CONFIG_NLS_ISO8859_15=y | ||
| 188 | CONFIG_NLS_KOI8_R=y | ||
| 189 | CONFIG_NLS_KOI8_U=y | ||
| 190 | CONFIG_NLS_UTF8=y | ||
| 191 | CONFIG_PRINTK_TIME=y | ||
| 192 | CONFIG_DEBUG_KERNEL=y | ||
| 193 | CONFIG_DEBUG_INFO=y | ||
| 194 | CONFIG_DEBUG_USER=y | ||
| 195 | CONFIG_DEBUG_LL=y | ||
| 196 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
| 197 | # CONFIG_CRYPTO_HW is not set | ||
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index c4da635ee4ce..3a2124212a7f 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
| 20 | #include <linux/platform_data/pcf857x.h> | 20 | #include <linux/platform_data/pcf857x.h> |
| 21 | #include <linux/platform_data/at24.h> | 21 | #include <linux/property.h> |
| 22 | #include <linux/mtd/mtd.h> | 22 | #include <linux/mtd/mtd.h> |
| 23 | #include <linux/mtd/partitions.h> | 23 | #include <linux/mtd/partitions.h> |
| 24 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
| @@ -52,62 +52,19 @@ static const short da830_evm_usb11_pins[] = { | |||
| 52 | -1 | 52 | -1 |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | static da8xx_ocic_handler_t da830_evm_usb_ocic_handler; | 55 | static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = { |
| 56 | 56 | .dev_id = "ohci-da8xx", | |
| 57 | static int da830_evm_usb_set_power(unsigned port, int on) | 57 | .table = { |
| 58 | { | 58 | GPIO_LOOKUP("davinci_gpio", ON_BD_USB_DRV, "vbus", 0), |
| 59 | gpio_set_value(ON_BD_USB_DRV, on); | 59 | GPIO_LOOKUP("davinci_gpio", ON_BD_USB_OVC, "oc", 0), |
| 60 | return 0; | 60 | }, |
| 61 | } | 61 | }; |
| 62 | |||
| 63 | static int da830_evm_usb_get_power(unsigned port) | ||
| 64 | { | ||
| 65 | return gpio_get_value(ON_BD_USB_DRV); | ||
| 66 | } | ||
| 67 | |||
| 68 | static int da830_evm_usb_get_oci(unsigned port) | ||
| 69 | { | ||
| 70 | return !gpio_get_value(ON_BD_USB_OVC); | ||
| 71 | } | ||
| 72 | |||
| 73 | static irqreturn_t da830_evm_usb_ocic_irq(int, void *); | ||
| 74 | |||
| 75 | static int da830_evm_usb_ocic_notify(da8xx_ocic_handler_t handler) | ||
| 76 | { | ||
| 77 | int irq = gpio_to_irq(ON_BD_USB_OVC); | ||
| 78 | int error = 0; | ||
| 79 | |||
| 80 | if (handler != NULL) { | ||
| 81 | da830_evm_usb_ocic_handler = handler; | ||
| 82 | |||
| 83 | error = request_irq(irq, da830_evm_usb_ocic_irq, | ||
| 84 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
| 85 | "OHCI over-current indicator", NULL); | ||
| 86 | if (error) | ||
| 87 | pr_err("%s: could not request IRQ to watch over-current indicator changes\n", | ||
| 88 | __func__); | ||
| 89 | } else | ||
| 90 | free_irq(irq, NULL); | ||
| 91 | |||
| 92 | return error; | ||
| 93 | } | ||
| 94 | 62 | ||
| 95 | static struct da8xx_ohci_root_hub da830_evm_usb11_pdata = { | 63 | static struct da8xx_ohci_root_hub da830_evm_usb11_pdata = { |
| 96 | .set_power = da830_evm_usb_set_power, | ||
| 97 | .get_power = da830_evm_usb_get_power, | ||
| 98 | .get_oci = da830_evm_usb_get_oci, | ||
| 99 | .ocic_notify = da830_evm_usb_ocic_notify, | ||
| 100 | |||
| 101 | /* TPS2065 switch @ 5V */ | 64 | /* TPS2065 switch @ 5V */ |
| 102 | .potpgt = (3 + 1) / 2, /* 3 ms max */ | 65 | .potpgt = (3 + 1) / 2, /* 3 ms max */ |
| 103 | }; | 66 | }; |
| 104 | 67 | ||
| 105 | static irqreturn_t da830_evm_usb_ocic_irq(int irq, void *dev_id) | ||
| 106 | { | ||
| 107 | da830_evm_usb_ocic_handler(&da830_evm_usb11_pdata, 1); | ||
| 108 | return IRQ_HANDLED; | ||
| 109 | } | ||
| 110 | |||
| 111 | static __init void da830_evm_usb_init(void) | 68 | static __init void da830_evm_usb_init(void) |
| 112 | { | 69 | { |
| 113 | int ret; | 70 | int ret; |
| @@ -142,21 +99,7 @@ static __init void da830_evm_usb_init(void) | |||
| 142 | return; | 99 | return; |
| 143 | } | 100 | } |
| 144 | 101 | ||
| 145 | ret = gpio_request(ON_BD_USB_DRV, "ON_BD_USB_DRV"); | 102 | gpiod_add_lookup_table(&da830_evm_usb_gpio_lookup); |
| 146 | if (ret) { | ||
| 147 | pr_err("%s: failed to request GPIO for USB 1.1 port power control: %d\n", | ||
| 148 | __func__, ret); | ||
| 149 | return; | ||
| 150 | } | ||
| 151 | gpio_direction_output(ON_BD_USB_DRV, 0); | ||
| 152 | |||
| 153 | ret = gpio_request(ON_BD_USB_OVC, "ON_BD_USB_OVC"); | ||
| 154 | if (ret) { | ||
| 155 | pr_err("%s: failed to request GPIO for USB 1.1 port over-current indicator: %d\n", | ||
| 156 | __func__, ret); | ||
| 157 | return; | ||
| 158 | } | ||
| 159 | gpio_direction_input(ON_BD_USB_OVC); | ||
| 160 | 103 | ||
| 161 | ret = da8xx_register_usb11(&da830_evm_usb11_pdata); | 104 | ret = da8xx_register_usb11(&da830_evm_usb11_pdata); |
| 162 | if (ret) | 105 | if (ret) |
| @@ -457,12 +400,9 @@ static struct nvmem_cell_lookup da830_evm_nvmem_cell_lookup = { | |||
| 457 | .con_id = "mac-address", | 400 | .con_id = "mac-address", |
| 458 | }; | 401 | }; |
| 459 | 402 | ||
| 460 | static struct at24_platform_data da830_evm_i2c_eeprom_info = { | 403 | static const struct property_entry da830_evm_i2c_eeprom_properties[] = { |
| 461 | .byte_len = SZ_256K / 8, | 404 | PROPERTY_ENTRY_U32("pagesize", 64), |
| 462 | .page_size = 64, | 405 | { } |
| 463 | .flags = AT24_FLAG_ADDR16, | ||
| 464 | .setup = davinci_get_mac_addr, | ||
| 465 | .context = (void *)0x7f00, | ||
| 466 | }; | 406 | }; |
| 467 | 407 | ||
| 468 | static int __init da830_evm_ui_expander_setup(struct i2c_client *client, | 408 | static int __init da830_evm_ui_expander_setup(struct i2c_client *client, |
| @@ -496,7 +436,7 @@ static struct pcf857x_platform_data __initdata da830_evm_ui_expander_info = { | |||
| 496 | static struct i2c_board_info __initdata da830_evm_i2c_devices[] = { | 436 | static struct i2c_board_info __initdata da830_evm_i2c_devices[] = { |
| 497 | { | 437 | { |
| 498 | I2C_BOARD_INFO("24c256", 0x50), | 438 | I2C_BOARD_INFO("24c256", 0x50), |
| 499 | .platform_data = &da830_evm_i2c_eeprom_info, | 439 | .properties = da830_evm_i2c_eeprom_properties, |
| 500 | }, | 440 | }, |
| 501 | { | 441 | { |
| 502 | I2C_BOARD_INFO("tlv320aic3x", 0x18), | 442 | I2C_BOARD_INFO("tlv320aic3x", 0x18), |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 44bca048dfd0..56d0e0257048 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
| @@ -150,32 +150,6 @@ static struct spi_board_info da850evm_spi_info[] = { | |||
| 150 | }, | 150 | }, |
| 151 | }; | 151 | }; |
| 152 | 152 | ||
| 153 | #ifdef CONFIG_MTD | ||
| 154 | static void da850_evm_m25p80_notify_add(struct mtd_info *mtd) | ||
| 155 | { | ||
| 156 | char *mac_addr = davinci_soc_info.emac_pdata->mac_addr; | ||
| 157 | size_t retlen; | ||
| 158 | |||
| 159 | if (!strcmp(mtd->name, "MAC-Address")) { | ||
| 160 | mtd_read(mtd, 0, ETH_ALEN, &retlen, mac_addr); | ||
| 161 | if (retlen == ETH_ALEN) | ||
| 162 | pr_info("Read MAC addr from SPI Flash: %pM\n", | ||
| 163 | mac_addr); | ||
| 164 | } | ||
| 165 | } | ||
| 166 | |||
| 167 | static struct mtd_notifier da850evm_spi_notifier = { | ||
| 168 | .add = da850_evm_m25p80_notify_add, | ||
| 169 | }; | ||
| 170 | |||
| 171 | static void da850_evm_setup_mac_addr(void) | ||
| 172 | { | ||
| 173 | register_mtd_user(&da850evm_spi_notifier); | ||
| 174 | } | ||
| 175 | #else | ||
| 176 | static void da850_evm_setup_mac_addr(void) { } | ||
| 177 | #endif | ||
| 178 | |||
| 179 | static struct mtd_partition da850_evm_norflash_partition[] = { | 153 | static struct mtd_partition da850_evm_norflash_partition[] = { |
| 180 | { | 154 | { |
| 181 | .name = "bootloaders + env", | 155 | .name = "bootloaders + env", |
| @@ -1064,6 +1038,17 @@ static const short da850_evm_rmii_pins[] = { | |||
| 1064 | -1 | 1038 | -1 |
| 1065 | }; | 1039 | }; |
| 1066 | 1040 | ||
| 1041 | static struct gpiod_hog da850_evm_emac_gpio_hogs[] = { | ||
| 1042 | { | ||
| 1043 | .chip_label = "davinci_gpio", | ||
| 1044 | .chip_hwnum = DA850_MII_MDIO_CLKEN_PIN, | ||
| 1045 | .line_name = "mdio_clk_en", | ||
| 1046 | .lflags = 0, | ||
| 1047 | /* dflags set in da850_evm_config_emac() */ | ||
| 1048 | }, | ||
| 1049 | { } | ||
| 1050 | }; | ||
| 1051 | |||
| 1067 | static int __init da850_evm_config_emac(void) | 1052 | static int __init da850_evm_config_emac(void) |
| 1068 | { | 1053 | { |
| 1069 | void __iomem *cfg_chip3_base; | 1054 | void __iomem *cfg_chip3_base; |
| @@ -1102,14 +1087,9 @@ static int __init da850_evm_config_emac(void) | |||
| 1102 | if (ret) | 1087 | if (ret) |
| 1103 | pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__); | 1088 | pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__); |
| 1104 | 1089 | ||
| 1105 | ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en"); | 1090 | da850_evm_emac_gpio_hogs[0].dflags = rmii_en ? GPIOD_OUT_HIGH |
| 1106 | if (ret) { | 1091 | : GPIOD_OUT_LOW; |
| 1107 | pr_warn("Cannot open GPIO %d\n", DA850_MII_MDIO_CLKEN_PIN); | 1092 | gpiod_add_hogs(da850_evm_emac_gpio_hogs); |
| 1108 | return ret; | ||
| 1109 | } | ||
| 1110 | |||
| 1111 | /* Enable/Disable MII MDIO clock */ | ||
| 1112 | gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, rmii_en); | ||
| 1113 | 1093 | ||
| 1114 | soc_info->emac_pdata->phy_id = DA850_EVM_PHY_ID; | 1094 | soc_info->emac_pdata->phy_id = DA850_EVM_PHY_ID; |
| 1115 | 1095 | ||
| @@ -1494,8 +1474,6 @@ static __init void da850_evm_init(void) | |||
| 1494 | if (ret) | 1474 | if (ret) |
| 1495 | pr_warn("%s: SATA registration failed: %d\n", __func__, ret); | 1475 | pr_warn("%s: SATA registration failed: %d\n", __func__, ret); |
| 1496 | 1476 | ||
| 1497 | da850_evm_setup_mac_addr(); | ||
| 1498 | |||
| 1499 | ret = da8xx_register_rproc(); | 1477 | ret = da8xx_register_rproc(); |
| 1500 | if (ret) | 1478 | if (ret) |
| 1501 | pr_warn("%s: dsp/rproc registration failed: %d\n", | 1479 | pr_warn("%s: dsp/rproc registration failed: %d\n", |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index e3b0b701e395..f21dc8d3b28c 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
| 19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
| 21 | #include <linux/platform_data/at24.h> | 21 | #include <linux/property.h> |
| 22 | #include <linux/leds.h> | 22 | #include <linux/leds.h> |
| 23 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
| 24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
| @@ -225,18 +225,15 @@ static struct nvmem_cell_lookup davinci_nvmem_cell_lookup = { | |||
| 225 | .con_id = "mac-address", | 225 | .con_id = "mac-address", |
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | static struct at24_platform_data eeprom_info = { | 228 | static const struct property_entry eeprom_properties[] = { |
| 229 | .byte_len = (256*1024) / 8, | 229 | PROPERTY_ENTRY_U32("pagesize", 64), |
| 230 | .page_size = 64, | 230 | { } |
| 231 | .flags = AT24_FLAG_ADDR16, | ||
| 232 | .setup = davinci_get_mac_addr, | ||
| 233 | .context = (void *)0x7f00, | ||
| 234 | }; | 231 | }; |
| 235 | 232 | ||
| 236 | static struct i2c_board_info i2c_info[] = { | 233 | static struct i2c_board_info i2c_info[] = { |
| 237 | { | 234 | { |
| 238 | I2C_BOARD_INFO("24c256", 0x50), | 235 | I2C_BOARD_INFO("24c256", 0x50), |
| 239 | .platform_data = &eeprom_info, | 236 | .properties = eeprom_properties, |
| 240 | }, | 237 | }, |
| 241 | { | 238 | { |
| 242 | I2C_BOARD_INFO("tlv320aic3x", 0x18), | 239 | I2C_BOARD_INFO("tlv320aic3x", 0x18), |
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index b80c4ee76217..ecd30643c2c4 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | #include <linux/gpio/machine.h> | 16 | #include <linux/gpio/machine.h> |
| 17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
| 18 | #include <linux/platform_data/pcf857x.h> | 18 | #include <linux/platform_data/pcf857x.h> |
| 19 | #include <linux/platform_data/at24.h> | ||
| 20 | #include <linux/platform_data/gpio-davinci.h> | 19 | #include <linux/platform_data/gpio-davinci.h> |
| 20 | #include <linux/property.h> | ||
| 21 | #include <linux/mtd/mtd.h> | 21 | #include <linux/mtd/mtd.h> |
| 22 | #include <linux/mtd/rawnand.h> | 22 | #include <linux/mtd/rawnand.h> |
| 23 | #include <linux/mtd/partitions.h> | 23 | #include <linux/mtd/partitions.h> |
| @@ -532,12 +532,9 @@ static struct nvmem_cell_lookup dm644evm_nvmem_cell_lookup = { | |||
| 532 | .con_id = "mac-address", | 532 | .con_id = "mac-address", |
| 533 | }; | 533 | }; |
| 534 | 534 | ||
| 535 | static struct at24_platform_data eeprom_info = { | 535 | static const struct property_entry eeprom_properties[] = { |
| 536 | .byte_len = (256*1024) / 8, | 536 | PROPERTY_ENTRY_U32("pagesize", 64), |
| 537 | .page_size = 64, | 537 | { } |
| 538 | .flags = AT24_FLAG_ADDR16, | ||
| 539 | .setup = davinci_get_mac_addr, | ||
| 540 | .context = (void *)0x7f00, | ||
| 541 | }; | 538 | }; |
| 542 | 539 | ||
| 543 | /* | 540 | /* |
| @@ -647,7 +644,7 @@ static struct i2c_board_info __initdata i2c_info[] = { | |||
| 647 | }, | 644 | }, |
| 648 | { | 645 | { |
| 649 | I2C_BOARD_INFO("24c256", 0x50), | 646 | I2C_BOARD_INFO("24c256", 0x50), |
| 650 | .platform_data = &eeprom_info, | 647 | .properties = eeprom_properties, |
| 651 | }, | 648 | }, |
| 652 | { | 649 | { |
| 653 | I2C_BOARD_INFO("tlv320aic33", 0x1b), | 650 | I2C_BOARD_INFO("tlv320aic33", 0x1b), |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 8d5be6dd2019..02b57face113 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
| 23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
| 24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
| 25 | #include <linux/platform_data/at24.h> | 25 | #include <linux/property.h> |
| 26 | #include <linux/platform_data/pcf857x.h> | 26 | #include <linux/platform_data/pcf857x.h> |
| 27 | #include <linux/platform_data/ti-aemif.h> | 27 | #include <linux/platform_data/ti-aemif.h> |
| 28 | 28 | ||
| @@ -364,12 +364,9 @@ static struct nvmem_cell_lookup dm646x_evm_nvmem_cell_lookup = { | |||
| 364 | .con_id = "mac-address", | 364 | .con_id = "mac-address", |
| 365 | }; | 365 | }; |
| 366 | 366 | ||
| 367 | static struct at24_platform_data eeprom_info = { | 367 | static const struct property_entry eeprom_properties[] = { |
| 368 | .byte_len = (256*1024) / 8, | 368 | PROPERTY_ENTRY_U32("pagesize", 64), |
| 369 | .page_size = 64, | 369 | { } |
| 370 | .flags = AT24_FLAG_ADDR16, | ||
| 371 | .setup = davinci_get_mac_addr, | ||
| 372 | .context = (void *)0x7f00, | ||
| 373 | }; | 370 | }; |
| 374 | #endif | 371 | #endif |
| 375 | 372 | ||
| @@ -440,7 +437,7 @@ static void evm_init_cpld(void) | |||
| 440 | static struct i2c_board_info __initdata i2c_info[] = { | 437 | static struct i2c_board_info __initdata i2c_info[] = { |
| 441 | { | 438 | { |
| 442 | I2C_BOARD_INFO("24c256", 0x50), | 439 | I2C_BOARD_INFO("24c256", 0x50), |
| 443 | .platform_data = &eeprom_info, | 440 | .properties = eeprom_properties, |
| 444 | }, | 441 | }, |
| 445 | { | 442 | { |
| 446 | I2C_BOARD_INFO("pcf8574a", 0x38), | 443 | I2C_BOARD_INFO("pcf8574a", 0x38), |
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 8df16e81b69e..a381b26328d8 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c | |||
| @@ -14,11 +14,13 @@ | |||
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/console.h> | 15 | #include <linux/console.h> |
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/property.h> | ||
| 17 | #include <linux/mtd/partitions.h> | 18 | #include <linux/mtd/partitions.h> |
| 19 | #include <linux/notifier.h> | ||
| 20 | #include <linux/nvmem-consumer.h> | ||
| 18 | #include <linux/nvmem-provider.h> | 21 | #include <linux/nvmem-provider.h> |
| 19 | #include <linux/regulator/machine.h> | 22 | #include <linux/regulator/machine.h> |
| 20 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
| 21 | #include <linux/platform_data/at24.h> | ||
| 22 | #include <linux/etherdevice.h> | 24 | #include <linux/etherdevice.h> |
| 23 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
| 24 | #include <linux/spi/flash.h> | 26 | #include <linux/spi/flash.h> |
| @@ -117,11 +119,15 @@ static void mityomapl138_cpufreq_init(const char *partnum) | |||
| 117 | static void mityomapl138_cpufreq_init(const char *partnum) { } | 119 | static void mityomapl138_cpufreq_init(const char *partnum) { } |
| 118 | #endif | 120 | #endif |
| 119 | 121 | ||
| 120 | static void read_factory_config(struct nvmem_device *nvmem, void *context) | 122 | static int read_factory_config(struct notifier_block *nb, |
| 123 | unsigned long event, void *data) | ||
| 121 | { | 124 | { |
| 122 | int ret; | 125 | int ret; |
| 123 | const char *partnum = NULL; | 126 | const char *partnum = NULL; |
| 124 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 127 | struct nvmem_device *nvmem = data; |
| 128 | |||
| 129 | if (strcmp(nvmem_dev_name(nvmem), "1-00500") != 0) | ||
| 130 | return NOTIFY_DONE; | ||
| 125 | 131 | ||
| 126 | if (!IS_BUILTIN(CONFIG_NVMEM)) { | 132 | if (!IS_BUILTIN(CONFIG_NVMEM)) { |
| 127 | pr_warn("Factory Config not available without CONFIG_NVMEM\n"); | 133 | pr_warn("Factory Config not available without CONFIG_NVMEM\n"); |
| @@ -147,21 +153,20 @@ static void read_factory_config(struct nvmem_device *nvmem, void *context) | |||
| 147 | goto bad_config; | 153 | goto bad_config; |
| 148 | } | 154 | } |
| 149 | 155 | ||
| 150 | pr_info("Found MAC = %pM\n", factory_config.mac); | ||
| 151 | if (is_valid_ether_addr(factory_config.mac)) | ||
| 152 | memcpy(soc_info->emac_pdata->mac_addr, | ||
| 153 | factory_config.mac, ETH_ALEN); | ||
| 154 | else | ||
| 155 | pr_warn("Invalid MAC found in factory config block\n"); | ||
| 156 | |||
| 157 | partnum = factory_config.partnum; | 156 | partnum = factory_config.partnum; |
| 158 | pr_info("Part Number = %s\n", partnum); | 157 | pr_info("Part Number = %s\n", partnum); |
| 159 | 158 | ||
| 160 | bad_config: | 159 | bad_config: |
| 161 | /* default maximum speed is valid for all platforms */ | 160 | /* default maximum speed is valid for all platforms */ |
| 162 | mityomapl138_cpufreq_init(partnum); | 161 | mityomapl138_cpufreq_init(partnum); |
| 162 | |||
| 163 | return NOTIFY_STOP; | ||
| 163 | } | 164 | } |
| 164 | 165 | ||
| 166 | static struct notifier_block mityomapl138_nvmem_notifier = { | ||
| 167 | .notifier_call = read_factory_config, | ||
| 168 | }; | ||
| 169 | |||
| 165 | /* | 170 | /* |
| 166 | * We don't define a cell for factory config as it will be accessed from the | 171 | * We don't define a cell for factory config as it will be accessed from the |
| 167 | * board file using the nvmem notifier chain. | 172 | * board file using the nvmem notifier chain. |
| @@ -187,12 +192,10 @@ static struct nvmem_cell_lookup mityomapl138_nvmem_cell_lookup = { | |||
| 187 | .con_id = "mac-address", | 192 | .con_id = "mac-address", |
| 188 | }; | 193 | }; |
| 189 | 194 | ||
| 190 | static struct at24_platform_data mityomapl138_fd_chip = { | 195 | static const struct property_entry mityomapl138_fd_chip_properties[] = { |
| 191 | .byte_len = 256, | 196 | PROPERTY_ENTRY_U32("pagesize", 8), |
| 192 | .page_size = 8, | 197 | PROPERTY_ENTRY_BOOL("read-only"), |
| 193 | .flags = AT24_FLAG_READONLY | AT24_FLAG_IRUGO, | 198 | { } |
| 194 | .setup = read_factory_config, | ||
| 195 | .context = NULL, | ||
| 196 | }; | 199 | }; |
| 197 | 200 | ||
| 198 | static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = { | 201 | static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = { |
| @@ -321,7 +324,7 @@ static struct i2c_board_info __initdata mityomap_tps65023_info[] = { | |||
| 321 | }, | 324 | }, |
| 322 | { | 325 | { |
| 323 | I2C_BOARD_INFO("24c02", 0x50), | 326 | I2C_BOARD_INFO("24c02", 0x50), |
| 324 | .platform_data = &mityomapl138_fd_chip, | 327 | .properties = mityomapl138_fd_chip_properties, |
| 325 | }, | 328 | }, |
| 326 | }; | 329 | }; |
| 327 | 330 | ||
| @@ -569,6 +572,7 @@ static void __init mityomapl138_init(void) | |||
| 569 | 572 | ||
| 570 | davinci_serial_init(da8xx_serial_device); | 573 | davinci_serial_init(da8xx_serial_device); |
| 571 | 574 | ||
| 575 | nvmem_register_notifier(&mityomapl138_nvmem_notifier); | ||
| 572 | nvmem_add_cell_table(&mityomapl138_nvmem_cell_table); | 576 | nvmem_add_cell_table(&mityomapl138_nvmem_cell_table); |
| 573 | nvmem_add_cell_lookups(&mityomapl138_nvmem_cell_lookup, 1); | 577 | nvmem_add_cell_lookups(&mityomapl138_nvmem_cell_lookup, 1); |
| 574 | 578 | ||
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 94c4f126ef86..88a0c62eee86 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c | |||
| @@ -294,66 +294,24 @@ static int omapl138_hawk_register_aemif(void) | |||
| 294 | return platform_device_register(&omapl138_hawk_aemif_device); | 294 | return platform_device_register(&omapl138_hawk_aemif_device); |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id); | ||
| 298 | static da8xx_ocic_handler_t hawk_usb_ocic_handler; | ||
| 299 | |||
| 300 | static const short da850_hawk_usb11_pins[] = { | 297 | static const short da850_hawk_usb11_pins[] = { |
| 301 | DA850_GPIO2_4, DA850_GPIO6_13, | 298 | DA850_GPIO2_4, DA850_GPIO6_13, |
| 302 | -1 | 299 | -1 |
| 303 | }; | 300 | }; |
| 304 | 301 | ||
| 305 | static int hawk_usb_set_power(unsigned port, int on) | 302 | static struct gpiod_lookup_table hawk_usb_gpio_lookup = { |
| 306 | { | 303 | .dev_id = "ohci-da8xx", |
| 307 | gpio_set_value(DA850_USB1_VBUS_PIN, on); | 304 | .table = { |
| 308 | return 0; | 305 | GPIO_LOOKUP("davinci_gpio", DA850_USB1_VBUS_PIN, "vbus", 0), |
| 309 | } | 306 | GPIO_LOOKUP("davinci_gpio", DA850_USB1_OC_PIN, "oc", 0), |
| 310 | 307 | }, | |
| 311 | static int hawk_usb_get_power(unsigned port) | 308 | }; |
| 312 | { | ||
| 313 | return gpio_get_value(DA850_USB1_VBUS_PIN); | ||
| 314 | } | ||
| 315 | |||
| 316 | static int hawk_usb_get_oci(unsigned port) | ||
| 317 | { | ||
| 318 | return !gpio_get_value(DA850_USB1_OC_PIN); | ||
| 319 | } | ||
| 320 | |||
| 321 | static int hawk_usb_ocic_notify(da8xx_ocic_handler_t handler) | ||
| 322 | { | ||
| 323 | int irq = gpio_to_irq(DA850_USB1_OC_PIN); | ||
| 324 | int error = 0; | ||
| 325 | |||
| 326 | if (handler != NULL) { | ||
| 327 | hawk_usb_ocic_handler = handler; | ||
| 328 | |||
| 329 | error = request_irq(irq, omapl138_hawk_usb_ocic_irq, | ||
| 330 | IRQF_TRIGGER_RISING | | ||
| 331 | IRQF_TRIGGER_FALLING, | ||
| 332 | "OHCI over-current indicator", NULL); | ||
| 333 | if (error) | ||
| 334 | pr_err("%s: could not request IRQ to watch " | ||
| 335 | "over-current indicator changes\n", __func__); | ||
| 336 | } else { | ||
| 337 | free_irq(irq, NULL); | ||
| 338 | } | ||
| 339 | return error; | ||
| 340 | } | ||
| 341 | 309 | ||
| 342 | static struct da8xx_ohci_root_hub omapl138_hawk_usb11_pdata = { | 310 | static struct da8xx_ohci_root_hub omapl138_hawk_usb11_pdata = { |
| 343 | .set_power = hawk_usb_set_power, | ||
| 344 | .get_power = hawk_usb_get_power, | ||
| 345 | .get_oci = hawk_usb_get_oci, | ||
| 346 | .ocic_notify = hawk_usb_ocic_notify, | ||
| 347 | /* TPS2087 switch @ 5V */ | 311 | /* TPS2087 switch @ 5V */ |
| 348 | .potpgt = (3 + 1) / 2, /* 3 ms max */ | 312 | .potpgt = (3 + 1) / 2, /* 3 ms max */ |
| 349 | }; | 313 | }; |
| 350 | 314 | ||
| 351 | static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id) | ||
| 352 | { | ||
| 353 | hawk_usb_ocic_handler(&omapl138_hawk_usb11_pdata, 1); | ||
| 354 | return IRQ_HANDLED; | ||
| 355 | } | ||
| 356 | |||
| 357 | static __init void omapl138_hawk_usb_init(void) | 315 | static __init void omapl138_hawk_usb_init(void) |
| 358 | { | 316 | { |
| 359 | int ret; | 317 | int ret; |
| @@ -374,34 +332,13 @@ static __init void omapl138_hawk_usb_init(void) | |||
| 374 | pr_warn("%s: USB PHY registration failed: %d\n", | 332 | pr_warn("%s: USB PHY registration failed: %d\n", |
| 375 | __func__, ret); | 333 | __func__, ret); |
| 376 | 334 | ||
| 377 | ret = gpio_request_one(DA850_USB1_VBUS_PIN, | 335 | gpiod_add_lookup_table(&hawk_usb_gpio_lookup); |
| 378 | GPIOF_DIR_OUT, "USB1 VBUS"); | ||
| 379 | if (ret < 0) { | ||
| 380 | pr_err("%s: failed to request GPIO for USB 1.1 port " | ||
| 381 | "power control: %d\n", __func__, ret); | ||
| 382 | return; | ||
| 383 | } | ||
| 384 | |||
| 385 | ret = gpio_request_one(DA850_USB1_OC_PIN, | ||
| 386 | GPIOF_DIR_IN, "USB1 OC"); | ||
| 387 | if (ret < 0) { | ||
| 388 | pr_err("%s: failed to request GPIO for USB 1.1 port " | ||
| 389 | "over-current indicator: %d\n", __func__, ret); | ||
| 390 | goto usb11_setup_oc_fail; | ||
| 391 | } | ||
| 392 | 336 | ||
| 393 | ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata); | 337 | ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata); |
| 394 | if (ret) { | 338 | if (ret) |
| 395 | pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret); | 339 | pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret); |
| 396 | goto usb11_setup_fail; | ||
| 397 | } | ||
| 398 | 340 | ||
| 399 | return; | 341 | return; |
| 400 | |||
| 401 | usb11_setup_fail: | ||
| 402 | gpio_free(DA850_USB1_OC_PIN); | ||
| 403 | usb11_setup_oc_fail: | ||
| 404 | gpio_free(DA850_USB1_VBUS_PIN); | ||
| 405 | } | 342 | } |
| 406 | 343 | ||
| 407 | static __init void omapl138_hawk_init(void) | 344 | static __init void omapl138_hawk_init(void) |
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c index 792bb84d5011..ff14de1396c8 100644 --- a/arch/arm/mach-davinci/board-sffsdr.c +++ b/arch/arm/mach-davinci/board-sffsdr.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
| 27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
| 28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
| 29 | #include <linux/platform_data/at24.h> | 29 | #include <linux/property.h> |
| 30 | #include <linux/mtd/mtd.h> | 30 | #include <linux/mtd/mtd.h> |
| 31 | #include <linux/mtd/rawnand.h> | 31 | #include <linux/mtd/rawnand.h> |
| 32 | #include <linux/mtd/partitions.h> | 32 | #include <linux/mtd/partitions.h> |
| @@ -92,16 +92,15 @@ static struct platform_device davinci_sffsdr_nandflash_device = { | |||
| 92 | .resource = davinci_sffsdr_nandflash_resource, | 92 | .resource = davinci_sffsdr_nandflash_resource, |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | static struct at24_platform_data eeprom_info = { | 95 | static const struct property_entry eeprom_properties[] = { |
| 96 | .byte_len = (64*1024) / 8, | 96 | PROPERTY_ENTRY_U32("pagesize", 32), |
| 97 | .page_size = 32, | 97 | { } |
| 98 | .flags = AT24_FLAG_ADDR16, | ||
| 99 | }; | 98 | }; |
| 100 | 99 | ||
| 101 | static struct i2c_board_info __initdata i2c_info[] = { | 100 | static struct i2c_board_info __initdata i2c_info[] = { |
| 102 | { | 101 | { |
| 103 | I2C_BOARD_INFO("24lc64", 0x50), | 102 | I2C_BOARD_INFO("24c64", 0x50), |
| 104 | .platform_data = &eeprom_info, | 103 | .properties = eeprom_properties, |
| 105 | }, | 104 | }, |
| 106 | /* Other I2C devices: | 105 | /* Other I2C devices: |
| 107 | * MSP430, addr 0x23 (not used) | 106 | * MSP430, addr 0x23 (not used) |
diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index e1d0f0d841ff..0c638fe15dcb 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c | |||
| @@ -26,21 +26,6 @@ EXPORT_SYMBOL(davinci_soc_info); | |||
| 26 | void __iomem *davinci_intc_base; | 26 | void __iomem *davinci_intc_base; |
| 27 | int davinci_intc_type; | 27 | int davinci_intc_type; |
| 28 | 28 | ||
| 29 | void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context) | ||
| 30 | { | ||
| 31 | char *mac_addr = davinci_soc_info.emac_pdata->mac_addr; | ||
| 32 | off_t offset = (off_t)context; | ||
| 33 | |||
| 34 | if (!IS_BUILTIN(CONFIG_NVMEM)) { | ||
| 35 | pr_warn("Cannot read MAC addr from EEPROM without CONFIG_NVMEM\n"); | ||
| 36 | return; | ||
| 37 | } | ||
| 38 | |||
| 39 | /* Read MAC addr from EEPROM */ | ||
| 40 | if (nvmem_device_read(nvmem, offset, ETH_ALEN, mac_addr) == ETH_ALEN) | ||
| 41 | pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr); | ||
| 42 | } | ||
| 43 | |||
| 44 | static int __init davinci_init_id(struct davinci_soc_info *soc_info) | 29 | static int __init davinci_init_id(struct davinci_soc_info *soc_info) |
| 45 | { | 30 | { |
| 46 | int i; | 31 | int i; |
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index c6a533699b00..85b74ac943f0 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | #include <mach/gpio-ep93xx.h> | 26 | #include <mach/gpio-ep93xx.h> |
| 27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
| 28 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
| 29 | #include <mach/gpio-ep93xx.h> | ||
| 30 | 29 | ||
| 31 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
| 32 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index c39ffd2e2fe6..b6da7edbbd2f 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
| @@ -336,9 +336,9 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
| 336 | /* wait max 10 ms until cpu1 is on */ | 336 | /* wait max 10 ms until cpu1 is on */ |
| 337 | while (exynos_cpu_power_state(core_id) | 337 | while (exynos_cpu_power_state(core_id) |
| 338 | != S5P_CORE_LOCAL_PWR_EN) { | 338 | != S5P_CORE_LOCAL_PWR_EN) { |
| 339 | if (timeout-- == 0) | 339 | if (timeout == 0) |
| 340 | break; | 340 | break; |
| 341 | 341 | timeout--; | |
| 342 | mdelay(1); | 342 | mdelay(1); |
| 343 | } | 343 | } |
| 344 | 344 | ||
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 8af2f7e91d13..35ff620537e6 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
| @@ -29,9 +29,10 @@ obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o | |||
| 29 | obj-$(CONFIG_SOC_IMX6SLL) += cpuidle-imx6sx.o | 29 | obj-$(CONFIG_SOC_IMX6SLL) += cpuidle-imx6sx.o |
| 30 | obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6sx.o | 30 | obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6sx.o |
| 31 | obj-$(CONFIG_SOC_IMX6UL) += cpuidle-imx6sx.o | 31 | obj-$(CONFIG_SOC_IMX6UL) += cpuidle-imx6sx.o |
| 32 | obj-$(CONFIG_SOC_IMX7ULP) += cpuidle-imx7ulp.o | ||
| 32 | endif | 33 | endif |
| 33 | 34 | ||
| 34 | ifdef CONFIG_SND_IMX_SOC | 35 | ifdef CONFIG_SND_SOC_IMX_PCM_FIQ |
| 35 | obj-y += ssi-fiq.o | 36 | obj-y += ssi-fiq.o |
| 36 | obj-y += ssi-fiq-ksym.o | 37 | obj-y += ssi-fiq-ksym.o |
| 37 | endif | 38 | endif |
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index bc915e5b4d56..c51764a85fd7 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
| @@ -72,6 +72,15 @@ enum mxc_cpu_pwr_mode { | |||
| 72 | STOP_POWER_OFF, /* STOP + SRPG */ | 72 | STOP_POWER_OFF, /* STOP + SRPG */ |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | enum ulp_cpu_pwr_mode { | ||
| 76 | ULP_PM_HSRUN, /* High speed run mode */ | ||
| 77 | ULP_PM_RUN, /* Run mode */ | ||
| 78 | ULP_PM_WAIT, /* Wait mode */ | ||
| 79 | ULP_PM_STOP, /* Stop mode */ | ||
| 80 | ULP_PM_VLPS, /* Very low power stop mode */ | ||
| 81 | ULP_PM_VLLS, /* very low leakage stop mode */ | ||
| 82 | }; | ||
| 83 | |||
| 75 | void imx_enable_cpu(int cpu, bool enable); | 84 | void imx_enable_cpu(int cpu, bool enable); |
| 76 | void imx_set_cpu_jump(int cpu, void *jump_addr); | 85 | void imx_set_cpu_jump(int cpu, void *jump_addr); |
| 77 | u32 imx_get_cpu_arg(int cpu); | 86 | u32 imx_get_cpu_arg(int cpu); |
| @@ -98,6 +107,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode); | |||
| 98 | void imx6_set_int_mem_clk_lpm(bool enable); | 107 | void imx6_set_int_mem_clk_lpm(bool enable); |
| 99 | void imx6sl_set_wait_clk(bool enter); | 108 | void imx6sl_set_wait_clk(bool enter); |
| 100 | int imx_mmdc_get_ddr_type(void); | 109 | int imx_mmdc_get_ddr_type(void); |
| 110 | int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode); | ||
| 101 | 111 | ||
| 102 | void imx_cpu_die(unsigned int cpu); | 112 | void imx_cpu_die(unsigned int cpu); |
| 103 | int imx_cpu_kill(unsigned int cpu); | 113 | int imx_cpu_kill(unsigned int cpu); |
diff --git a/arch/arm/mach-imx/cpuidle-imx7ulp.c b/arch/arm/mach-imx/cpuidle-imx7ulp.c new file mode 100644 index 000000000000..ca86c967d19e --- /dev/null +++ b/arch/arm/mach-imx/cpuidle-imx7ulp.c | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0+ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2016 Freescale Semiconductor, Inc. | ||
| 4 | * Copyright 2017-2018 NXP | ||
| 5 | * Anson Huang <Anson.Huang@nxp.com> | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include <linux/cpuidle.h> | ||
| 9 | #include <linux/module.h> | ||
| 10 | #include <asm/cpuidle.h> | ||
| 11 | |||
| 12 | #include "common.h" | ||
| 13 | #include "cpuidle.h" | ||
| 14 | |||
| 15 | static int imx7ulp_enter_wait(struct cpuidle_device *dev, | ||
| 16 | struct cpuidle_driver *drv, int index) | ||
| 17 | { | ||
| 18 | if (index == 1) | ||
| 19 | imx7ulp_set_lpm(ULP_PM_WAIT); | ||
| 20 | else | ||
| 21 | imx7ulp_set_lpm(ULP_PM_STOP); | ||
| 22 | |||
| 23 | cpu_do_idle(); | ||
| 24 | |||
| 25 | imx7ulp_set_lpm(ULP_PM_RUN); | ||
| 26 | |||
| 27 | return index; | ||
| 28 | } | ||
| 29 | |||
| 30 | static struct cpuidle_driver imx7ulp_cpuidle_driver = { | ||
| 31 | .name = "imx7ulp_cpuidle", | ||
| 32 | .owner = THIS_MODULE, | ||
| 33 | .states = { | ||
| 34 | /* WFI */ | ||
| 35 | ARM_CPUIDLE_WFI_STATE, | ||
| 36 | /* WAIT */ | ||
| 37 | { | ||
| 38 | .exit_latency = 50, | ||
| 39 | .target_residency = 75, | ||
| 40 | .enter = imx7ulp_enter_wait, | ||
| 41 | .name = "WAIT", | ||
| 42 | .desc = "PSTOP2", | ||
| 43 | }, | ||
| 44 | /* STOP */ | ||
| 45 | { | ||
| 46 | .exit_latency = 100, | ||
| 47 | .target_residency = 150, | ||
| 48 | .enter = imx7ulp_enter_wait, | ||
| 49 | .name = "STOP", | ||
| 50 | .desc = "PSTOP1", | ||
| 51 | }, | ||
| 52 | }, | ||
| 53 | .state_count = 3, | ||
| 54 | .safe_state_index = 0, | ||
| 55 | }; | ||
| 56 | |||
| 57 | int __init imx7ulp_cpuidle_init(void) | ||
| 58 | { | ||
| 59 | return cpuidle_register(&imx7ulp_cpuidle_driver, NULL); | ||
| 60 | } | ||
diff --git a/arch/arm/mach-imx/cpuidle.h b/arch/arm/mach-imx/cpuidle.h index f9140128ba05..7694c8f810a4 100644 --- a/arch/arm/mach-imx/cpuidle.h +++ b/arch/arm/mach-imx/cpuidle.h | |||
| @@ -15,6 +15,7 @@ extern int imx5_cpuidle_init(void); | |||
| 15 | extern int imx6q_cpuidle_init(void); | 15 | extern int imx6q_cpuidle_init(void); |
| 16 | extern int imx6sl_cpuidle_init(void); | 16 | extern int imx6sl_cpuidle_init(void); |
| 17 | extern int imx6sx_cpuidle_init(void); | 17 | extern int imx6sx_cpuidle_init(void); |
| 18 | extern int imx7ulp_cpuidle_init(void); | ||
| 18 | #else | 19 | #else |
| 19 | static inline int imx5_cpuidle_init(void) | 20 | static inline int imx5_cpuidle_init(void) |
| 20 | { | 21 | { |
| @@ -32,4 +33,8 @@ static inline int imx6sx_cpuidle_init(void) | |||
| 32 | { | 33 | { |
| 33 | return 0; | 34 | return 0; |
| 34 | } | 35 | } |
| 36 | static inline int imx7ulp_cpuidle_init(void) | ||
| 37 | { | ||
| 38 | return 0; | ||
| 39 | } | ||
| 35 | #endif | 40 | #endif |
diff --git a/arch/arm/mach-imx/mach-imx7ulp.c b/arch/arm/mach-imx/mach-imx7ulp.c index 33937ebf66b5..11ac71aaf965 100644 --- a/arch/arm/mach-imx/mach-imx7ulp.c +++ b/arch/arm/mach-imx/mach-imx7ulp.c | |||
| @@ -6,17 +6,57 @@ | |||
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <linux/irqchip.h> | 8 | #include <linux/irqchip.h> |
| 9 | #include <linux/mfd/syscon.h> | ||
| 9 | #include <linux/of_platform.h> | 10 | #include <linux/of_platform.h> |
| 11 | #include <linux/regmap.h> | ||
| 10 | #include <asm/mach/arch.h> | 12 | #include <asm/mach/arch.h> |
| 11 | 13 | ||
| 12 | #include "common.h" | 14 | #include "common.h" |
| 15 | #include "cpuidle.h" | ||
| 13 | #include "hardware.h" | 16 | #include "hardware.h" |
| 14 | 17 | ||
| 18 | #define SIM_JTAG_ID_REG 0x8c | ||
| 19 | |||
| 20 | static void __init imx7ulp_set_revision(void) | ||
| 21 | { | ||
| 22 | struct regmap *sim; | ||
| 23 | u32 revision; | ||
| 24 | |||
| 25 | sim = syscon_regmap_lookup_by_compatible("fsl,imx7ulp-sim"); | ||
| 26 | if (IS_ERR(sim)) { | ||
| 27 | pr_warn("failed to find fsl,imx7ulp-sim regmap!\n"); | ||
| 28 | return; | ||
| 29 | } | ||
| 30 | |||
| 31 | if (regmap_read(sim, SIM_JTAG_ID_REG, &revision)) { | ||
| 32 | pr_warn("failed to read sim regmap!\n"); | ||
| 33 | return; | ||
| 34 | } | ||
| 35 | |||
| 36 | /* | ||
| 37 | * bit[31:28] of JTAG_ID register defines revision as below from B0: | ||
| 38 | * 0001 B0 | ||
| 39 | * 0010 B1 | ||
| 40 | */ | ||
| 41 | switch (revision >> 28) { | ||
| 42 | case 1: | ||
| 43 | imx_set_soc_revision(IMX_CHIP_REVISION_2_0); | ||
| 44 | break; | ||
| 45 | case 2: | ||
| 46 | imx_set_soc_revision(IMX_CHIP_REVISION_2_1); | ||
| 47 | break; | ||
| 48 | default: | ||
| 49 | imx_set_soc_revision(IMX_CHIP_REVISION_1_0); | ||
| 50 | break; | ||
| 51 | } | ||
| 52 | } | ||
| 53 | |||
| 15 | static void __init imx7ulp_init_machine(void) | 54 | static void __init imx7ulp_init_machine(void) |
| 16 | { | 55 | { |
| 17 | imx7ulp_pm_init(); | 56 | imx7ulp_pm_init(); |
| 18 | 57 | ||
| 19 | mxc_set_cpu_type(MXC_CPU_IMX7ULP); | 58 | mxc_set_cpu_type(MXC_CPU_IMX7ULP); |
| 59 | imx7ulp_set_revision(); | ||
| 20 | of_platform_default_populate(NULL, NULL, imx_soc_device_init()); | 60 | of_platform_default_populate(NULL, NULL, imx_soc_device_init()); |
| 21 | } | 61 | } |
| 22 | 62 | ||
| @@ -25,7 +65,13 @@ static const char *const imx7ulp_dt_compat[] __initconst = { | |||
| 25 | NULL, | 65 | NULL, |
| 26 | }; | 66 | }; |
| 27 | 67 | ||
| 68 | static void __init imx7ulp_init_late(void) | ||
| 69 | { | ||
| 70 | imx7ulp_cpuidle_init(); | ||
| 71 | } | ||
| 72 | |||
| 28 | DT_MACHINE_START(IMX7ulp, "Freescale i.MX7ULP (Device Tree)") | 73 | DT_MACHINE_START(IMX7ulp, "Freescale i.MX7ULP (Device Tree)") |
| 29 | .init_machine = imx7ulp_init_machine, | 74 | .init_machine = imx7ulp_init_machine, |
| 30 | .dt_compat = imx7ulp_dt_compat, | 75 | .dt_compat = imx7ulp_dt_compat, |
| 76 | .init_late = imx7ulp_init_late, | ||
| 31 | MACHINE_END | 77 | MACHINE_END |
diff --git a/arch/arm/mach-imx/pm-imx7ulp.c b/arch/arm/mach-imx/pm-imx7ulp.c index cf6a380c2b8d..7b2f7387e662 100644 --- a/arch/arm/mach-imx/pm-imx7ulp.c +++ b/arch/arm/mach-imx/pm-imx7ulp.c | |||
| @@ -9,21 +9,60 @@ | |||
| 9 | #include <linux/of.h> | 9 | #include <linux/of.h> |
| 10 | #include <linux/of_address.h> | 10 | #include <linux/of_address.h> |
| 11 | 11 | ||
| 12 | #include "common.h" | ||
| 13 | |||
| 12 | #define SMC_PMCTRL 0x10 | 14 | #define SMC_PMCTRL 0x10 |
| 13 | #define BP_PMCTRL_PSTOPO 16 | 15 | #define BP_PMCTRL_PSTOPO 16 |
| 14 | #define PSTOPO_PSTOP3 0x3 | 16 | #define PSTOPO_PSTOP3 0x3 |
| 17 | #define PSTOPO_PSTOP2 0x2 | ||
| 18 | #define PSTOPO_PSTOP1 0x1 | ||
| 19 | #define BP_PMCTRL_RUNM 8 | ||
| 20 | #define RUNM_RUN 0 | ||
| 21 | #define BP_PMCTRL_STOPM 0 | ||
| 22 | #define STOPM_STOP 0 | ||
| 23 | |||
| 24 | #define BM_PMCTRL_PSTOPO (3 << BP_PMCTRL_PSTOPO) | ||
| 25 | #define BM_PMCTRL_RUNM (3 << BP_PMCTRL_RUNM) | ||
| 26 | #define BM_PMCTRL_STOPM (7 << BP_PMCTRL_STOPM) | ||
| 27 | |||
| 28 | static void __iomem *smc1_base; | ||
| 29 | |||
| 30 | int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode) | ||
| 31 | { | ||
| 32 | u32 val = readl_relaxed(smc1_base + SMC_PMCTRL); | ||
| 33 | |||
| 34 | /* clear all */ | ||
| 35 | val &= ~(BM_PMCTRL_RUNM | BM_PMCTRL_STOPM | BM_PMCTRL_PSTOPO); | ||
| 36 | |||
| 37 | switch (mode) { | ||
| 38 | case ULP_PM_RUN: | ||
| 39 | /* system/bus clock enabled */ | ||
| 40 | val |= PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO; | ||
| 41 | break; | ||
| 42 | case ULP_PM_WAIT: | ||
| 43 | /* system clock disabled, bus clock enabled */ | ||
| 44 | val |= PSTOPO_PSTOP2 << BP_PMCTRL_PSTOPO; | ||
| 45 | break; | ||
| 46 | case ULP_PM_STOP: | ||
| 47 | /* system/bus clock disabled */ | ||
| 48 | val |= PSTOPO_PSTOP1 << BP_PMCTRL_PSTOPO; | ||
| 49 | break; | ||
| 50 | default: | ||
| 51 | return -EINVAL; | ||
| 52 | } | ||
| 53 | |||
| 54 | writel_relaxed(val, smc1_base + SMC_PMCTRL); | ||
| 55 | |||
| 56 | return 0; | ||
| 57 | } | ||
| 15 | 58 | ||
| 16 | void __init imx7ulp_pm_init(void) | 59 | void __init imx7ulp_pm_init(void) |
| 17 | { | 60 | { |
| 18 | struct device_node *np; | 61 | struct device_node *np; |
| 19 | void __iomem *smc1_base; | ||
| 20 | 62 | ||
| 21 | np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1"); | 63 | np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1"); |
| 22 | smc1_base = of_iomap(np, 0); | 64 | smc1_base = of_iomap(np, 0); |
| 23 | WARN_ON(!smc1_base); | 65 | WARN_ON(!smc1_base); |
| 24 | 66 | ||
| 25 | /* Partial Stop mode 3 with system/bus clock enabled */ | 67 | imx7ulp_set_lpm(ULP_PM_RUN); |
| 26 | writel_relaxed(PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO, | ||
| 27 | smc1_base + SMC_PMCTRL); | ||
| 28 | iounmap(smc1_base); | ||
| 29 | } | 68 | } |
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index e48cc06c2aec..b3be60a8e467 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c | |||
| @@ -45,73 +45,6 @@ | |||
| 45 | #include <mach/board.h> | 45 | #include <mach/board.h> |
| 46 | #include "common.h" | 46 | #include "common.h" |
| 47 | 47 | ||
| 48 | /* | ||
| 49 | * AMBA LCD controller | ||
| 50 | */ | ||
| 51 | static struct clcd_panel conn_lcd_panel = { | ||
| 52 | .mode = { | ||
| 53 | .name = "QVGA portrait", | ||
| 54 | .refresh = 60, | ||
| 55 | .xres = 240, | ||
| 56 | .yres = 320, | ||
| 57 | .pixclock = 191828, | ||
| 58 | .left_margin = 22, | ||
| 59 | .right_margin = 11, | ||
| 60 | .upper_margin = 2, | ||
| 61 | .lower_margin = 1, | ||
| 62 | .hsync_len = 5, | ||
| 63 | .vsync_len = 2, | ||
| 64 | .sync = 0, | ||
| 65 | .vmode = FB_VMODE_NONINTERLACED, | ||
| 66 | }, | ||
| 67 | .width = -1, | ||
| 68 | .height = -1, | ||
| 69 | .tim2 = (TIM2_IVS | TIM2_IHS), | ||
| 70 | .cntl = (CNTL_BGR | CNTL_LCDTFT | CNTL_LCDVCOMP(1) | | ||
| 71 | CNTL_LCDBPP16_565), | ||
| 72 | .bpp = 16, | ||
| 73 | }; | ||
| 74 | #define PANEL_SIZE (3 * SZ_64K) | ||
| 75 | |||
| 76 | static int lpc32xx_clcd_setup(struct clcd_fb *fb) | ||
| 77 | { | ||
| 78 | dma_addr_t dma; | ||
| 79 | |||
| 80 | fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, PANEL_SIZE, &dma, | ||
| 81 | GFP_KERNEL); | ||
| 82 | if (!fb->fb.screen_base) { | ||
| 83 | printk(KERN_ERR "CLCD: unable to map framebuffer\n"); | ||
| 84 | return -ENOMEM; | ||
| 85 | } | ||
| 86 | |||
| 87 | fb->fb.fix.smem_start = dma; | ||
| 88 | fb->fb.fix.smem_len = PANEL_SIZE; | ||
| 89 | fb->panel = &conn_lcd_panel; | ||
| 90 | |||
| 91 | return 0; | ||
| 92 | } | ||
| 93 | |||
| 94 | static int lpc32xx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) | ||
| 95 | { | ||
| 96 | return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base, | ||
| 97 | fb->fb.fix.smem_start, fb->fb.fix.smem_len); | ||
| 98 | } | ||
| 99 | |||
| 100 | static void lpc32xx_clcd_remove(struct clcd_fb *fb) | ||
| 101 | { | ||
| 102 | dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base, | ||
| 103 | fb->fb.fix.smem_start); | ||
| 104 | } | ||
| 105 | |||
| 106 | static struct clcd_board lpc32xx_clcd_data = { | ||
| 107 | .name = "Phytec LCD", | ||
| 108 | .check = clcdfb_check, | ||
| 109 | .decode = clcdfb_decode, | ||
| 110 | .setup = lpc32xx_clcd_setup, | ||
| 111 | .mmap = lpc32xx_clcd_mmap, | ||
| 112 | .remove = lpc32xx_clcd_remove, | ||
| 113 | }; | ||
| 114 | |||
| 115 | static struct pl08x_channel_data pl08x_slave_channels[] = { | 48 | static struct pl08x_channel_data pl08x_slave_channels[] = { |
| 116 | { | 49 | { |
| 117 | .bus_id = "nand-slc", | 50 | .bus_id = "nand-slc", |
| @@ -148,11 +81,6 @@ static struct pl08x_platform_data pl08x_pd = { | |||
| 148 | .mem_buses = PL08X_AHB1, | 81 | .mem_buses = PL08X_AHB1, |
| 149 | }; | 82 | }; |
| 150 | 83 | ||
| 151 | static struct mmci_platform_data lpc32xx_mmci_data = { | ||
| 152 | .ocr_mask = MMC_VDD_30_31 | MMC_VDD_31_32 | | ||
| 153 | MMC_VDD_32_33 | MMC_VDD_33_34, | ||
| 154 | }; | ||
| 155 | |||
| 156 | static struct lpc32xx_slc_platform_data lpc32xx_slc_data = { | 84 | static struct lpc32xx_slc_platform_data lpc32xx_slc_data = { |
| 157 | .dma_filter = pl08x_filter_id, | 85 | .dma_filter = pl08x_filter_id, |
| 158 | }; | 86 | }; |
| @@ -164,10 +92,7 @@ static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = { | |||
| 164 | static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { | 92 | static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { |
| 165 | OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL), | 93 | OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL), |
| 166 | OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL), | 94 | OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL), |
| 167 | OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data), | ||
| 168 | OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd), | 95 | OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd), |
| 169 | OF_DEV_AUXDATA("arm,pl18x", 0x20098000, "20098000.sd", | ||
| 170 | &lpc32xx_mmci_data), | ||
| 171 | OF_DEV_AUXDATA("nxp,lpc3220-slc", 0x20020000, "20020000.flash", | 96 | OF_DEV_AUXDATA("nxp,lpc3220-slc", 0x20020000, "20020000.flash", |
| 172 | &lpc32xx_slc_data), | 97 | &lpc32xx_slc_data), |
| 173 | OF_DEV_AUXDATA("nxp,lpc3220-mlc", 0x200a8000, "200a8000.flash", | 98 | OF_DEV_AUXDATA("nxp,lpc3220-mlc", 0x200a8000, "200a8000.flash", |
| @@ -177,15 +102,6 @@ static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { | |||
| 177 | 102 | ||
| 178 | static void __init lpc3250_machine_init(void) | 103 | static void __init lpc3250_machine_init(void) |
| 179 | { | 104 | { |
| 180 | u32 tmp; | ||
| 181 | |||
| 182 | /* Setup LCD muxing to RGB565 */ | ||
| 183 | tmp = __raw_readl(LPC32XX_CLKPWR_LCDCLK_CTRL) & | ||
| 184 | ~(LPC32XX_CLKPWR_LCDCTRL_LCDTYPE_MSK | | ||
| 185 | LPC32XX_CLKPWR_LCDCTRL_PSCALE_MSK); | ||
| 186 | tmp |= LPC32XX_CLKPWR_LCDCTRL_LCDTYPE_TFT16; | ||
| 187 | __raw_writel(tmp, LPC32XX_CLKPWR_LCDCLK_CTRL); | ||
| 188 | |||
| 189 | lpc32xx_serial_init(); | 105 | lpc32xx_serial_init(); |
| 190 | 106 | ||
| 191 | /* Test clock needed for UDA1380 initial init */ | 107 | /* Test clock needed for UDA1380 initial init */ |
diff --git a/arch/arm/mach-lpc32xx/pm.c b/arch/arm/mach-lpc32xx/pm.c index 62471570d586..32bca351a73b 100644 --- a/arch/arm/mach-lpc32xx/pm.c +++ b/arch/arm/mach-lpc32xx/pm.c | |||
| @@ -86,17 +86,10 @@ static int lpc32xx_pm_enter(suspend_state_t state) | |||
| 86 | void *iram_swap_area; | 86 | void *iram_swap_area; |
| 87 | 87 | ||
| 88 | /* Allocate some space for temporary IRAM storage */ | 88 | /* Allocate some space for temporary IRAM storage */ |
| 89 | iram_swap_area = kmalloc(lpc32xx_sys_suspend_sz, GFP_KERNEL); | 89 | iram_swap_area = kmemdup((void *)TEMP_IRAM_AREA, |
| 90 | if (!iram_swap_area) { | 90 | lpc32xx_sys_suspend_sz, GFP_KERNEL); |
| 91 | printk(KERN_ERR | 91 | if (!iram_swap_area) |
| 92 | "PM Suspend: cannot allocate memory to save portion " | ||
| 93 | "of SRAM\n"); | ||
| 94 | return -ENOMEM; | 92 | return -ENOMEM; |
| 95 | } | ||
| 96 | |||
| 97 | /* Backup a small area of IRAM used for the suspend code */ | ||
| 98 | memcpy(iram_swap_area, (void *) TEMP_IRAM_AREA, | ||
| 99 | lpc32xx_sys_suspend_sz); | ||
| 100 | 93 | ||
| 101 | /* | 94 | /* |
| 102 | * Copy code to suspend system into IRAM. The suspend code | 95 | * Copy code to suspend system into IRAM. The suspend code |
diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig index 91cc461f7b04..11ed264f0731 100644 --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig | |||
| @@ -26,6 +26,10 @@ config MACH_MT7623 | |||
| 26 | bool "MediaTek MT7623 SoCs support" | 26 | bool "MediaTek MT7623 SoCs support" |
| 27 | default ARCH_MEDIATEK | 27 | default ARCH_MEDIATEK |
| 28 | 28 | ||
| 29 | config MACH_MT7629 | ||
| 30 | bool "MediaTek MT7629 SoCs support" | ||
| 31 | default ARCH_MEDIATEK | ||
| 32 | |||
| 29 | config MACH_MT8127 | 33 | config MACH_MT8127 |
| 30 | bool "MediaTek MT8127 SoCs support" | 34 | bool "MediaTek MT8127 SoCs support" |
| 31 | default ARCH_MEDIATEK | 35 | default ARCH_MEDIATEK |
diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c index 6910b4e0d913..b6a81ba1ce32 100644 --- a/arch/arm/mach-mediatek/mediatek.c +++ b/arch/arm/mach-mediatek/mediatek.c | |||
| @@ -30,7 +30,6 @@ static void __init mediatek_timer_init(void) | |||
| 30 | 30 | ||
| 31 | if (of_machine_is_compatible("mediatek,mt6589") || | 31 | if (of_machine_is_compatible("mediatek,mt6589") || |
| 32 | of_machine_is_compatible("mediatek,mt7623") || | 32 | of_machine_is_compatible("mediatek,mt7623") || |
| 33 | of_machine_is_compatible("mediatek,mt7623a") || | ||
| 34 | of_machine_is_compatible("mediatek,mt8135") || | 33 | of_machine_is_compatible("mediatek,mt8135") || |
| 35 | of_machine_is_compatible("mediatek,mt8127")) { | 34 | of_machine_is_compatible("mediatek,mt8127")) { |
| 36 | /* turn on GPT6 which ungates arch timer clocks */ | 35 | /* turn on GPT6 which ungates arch timer clocks */ |
| @@ -50,7 +49,7 @@ static const char * const mediatek_board_dt_compat[] = { | |||
| 50 | "mediatek,mt6589", | 49 | "mediatek,mt6589", |
| 51 | "mediatek,mt6592", | 50 | "mediatek,mt6592", |
| 52 | "mediatek,mt7623", | 51 | "mediatek,mt7623", |
| 53 | "mediatek,mt7623a", | 52 | "mediatek,mt7629", |
| 54 | "mediatek,mt8127", | 53 | "mediatek,mt8127", |
| 55 | "mediatek,mt8135", | 54 | "mediatek,mt8135", |
| 56 | NULL, | 55 | NULL, |
diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c index 6882ff07aaa6..c9d7c0458452 100644 --- a/arch/arm/mach-mediatek/platsmp.c +++ b/arch/arm/mach-mediatek/platsmp.c | |||
| @@ -60,7 +60,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { | |||
| 60 | static const struct of_device_id mtk_smp_boot_infos[] __initconst = { | 60 | static const struct of_device_id mtk_smp_boot_infos[] __initconst = { |
| 61 | { .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot }, | 61 | { .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot }, |
| 62 | { .compatible = "mediatek,mt7623", .data = &mtk_mt7623_boot }, | 62 | { .compatible = "mediatek,mt7623", .data = &mtk_mt7623_boot }, |
| 63 | { .compatible = "mediatek,mt7623a", .data = &mtk_mt7623_boot }, | 63 | { .compatible = "mediatek,mt7629", .data = &mtk_mt7623_boot }, |
| 64 | {}, | 64 | {}, |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig index b16831697183..15e9cb75738e 100644 --- a/arch/arm/mach-meson/Kconfig +++ b/arch/arm/mach-meson/Kconfig | |||
| @@ -9,7 +9,6 @@ menuconfig ARCH_MESON | |||
| 9 | select PINCTRL | 9 | select PINCTRL |
| 10 | select PINCTRL_MESON | 10 | select PINCTRL_MESON |
| 11 | select COMMON_CLK | 11 | select COMMON_CLK |
| 12 | select COMMON_CLK_AMLOGIC | ||
| 13 | select HAVE_ARM_SCU if SMP | 12 | select HAVE_ARM_SCU if SMP |
| 14 | select HAVE_ARM_TWD if SMP | 13 | select HAVE_ARM_TWD if SMP |
| 15 | 14 | ||
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index dc8e4f4b7ade..8839c72fdee3 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
| @@ -454,24 +454,6 @@ config MACH_TREO680 | |||
| 454 | Say Y here if you intend to run this kernel on Palm Treo 680 | 454 | Say Y here if you intend to run this kernel on Palm Treo 680 |
| 455 | smartphone. | 455 | smartphone. |
| 456 | 456 | ||
| 457 | config MACH_RAUMFELD_RC | ||
| 458 | bool "Raumfeld Controller" | ||
| 459 | select CPU_PXA300 | ||
| 460 | select POWER_SUPPLY | ||
| 461 | select PXA3xx | ||
| 462 | |||
| 463 | config MACH_RAUMFELD_CONNECTOR | ||
| 464 | bool "Raumfeld Connector" | ||
| 465 | select CPU_PXA300 | ||
| 466 | select POWER_SUPPLY | ||
| 467 | select PXA3xx | ||
| 468 | |||
| 469 | config MACH_RAUMFELD_SPEAKER | ||
| 470 | bool "Raumfeld Speaker" | ||
| 471 | select CPU_PXA300 | ||
| 472 | select POWER_SUPPLY | ||
| 473 | select PXA3xx | ||
| 474 | |||
| 475 | config PXA_SHARPSL | 457 | config PXA_SHARPSL |
| 476 | bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models" | 458 | bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models" |
| 477 | select SHARP_PARAM | 459 | select SHARP_PARAM |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 0a8e9611052f..f70728930c4f 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
| @@ -86,9 +86,6 @@ obj-$(CONFIG_MACH_POODLE) += poodle.o | |||
| 86 | obj-$(CONFIG_MACH_TOSA) += tosa.o | 86 | obj-$(CONFIG_MACH_TOSA) += tosa.o |
| 87 | obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o | 87 | obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o |
| 88 | obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o | 88 | obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o |
| 89 | obj-$(CONFIG_MACH_RAUMFELD_RC) += raumfeld.o | ||
| 90 | obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o | ||
| 91 | obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o | ||
| 92 | obj-$(CONFIG_MACH_ZIPIT2) += z2.o | 89 | obj-$(CONFIG_MACH_ZIPIT2) += z2.o |
| 93 | 90 | ||
| 94 | obj-$(CONFIG_PXA_SYSTEMS_CPLDS) += pxa_cplds_irqs.o | 91 | obj-$(CONFIG_PXA_SYSTEMS_CPLDS) += pxa_cplds_irqs.o |
diff --git a/arch/arm/mach-pxa/include/mach/pxa25x-udc.h b/arch/arm/mach-pxa/include/mach/pxa25x-udc.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/arch/arm/mach-pxa/include/mach/pxa25x-udc.h +++ /dev/null | |||
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c deleted file mode 100644 index e13bfc9b01d2..000000000000 --- a/arch/arm/mach-pxa/raumfeld.c +++ /dev/null | |||
| @@ -1,1186 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-pxa/raumfeld.c | ||
| 3 | * | ||
| 4 | * Support for the following Raumfeld devices: | ||
| 5 | * | ||
| 6 | * * Controller | ||
| 7 | * * Connector | ||
| 8 | * * Speaker S/M | ||
| 9 | * | ||
| 10 | * See http://www.raumfeld.com for details. | ||
| 11 | * | ||
| 12 | * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> | ||
| 13 | * | ||
| 14 | * This program is free software; you can redistribute it and/or modify | ||
| 15 | * it under the terms of the GNU General Public License version 2 as | ||
| 16 | * published by the Free Software Foundation. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include <linux/init.h> | ||
| 20 | #include <linux/kernel.h> | ||
| 21 | #include <linux/property.h> | ||
| 22 | #include <linux/platform_device.h> | ||
| 23 | #include <linux/interrupt.h> | ||
| 24 | #include <linux/gpio.h> | ||
| 25 | #include <linux/gpio/machine.h> | ||
| 26 | #include <linux/smsc911x.h> | ||
| 27 | #include <linux/input.h> | ||
| 28 | #include <linux/gpio_keys.h> | ||
| 29 | #include <linux/leds.h> | ||
| 30 | #include <linux/w1-gpio.h> | ||
| 31 | #include <linux/sched.h> | ||
| 32 | #include <linux/pwm.h> | ||
| 33 | #include <linux/pwm_backlight.h> | ||
| 34 | #include <linux/i2c.h> | ||
| 35 | #include <linux/platform_data/i2c-pxa.h> | ||
| 36 | #include <linux/spi/spi.h> | ||
| 37 | #include <linux/spi/spi_gpio.h> | ||
| 38 | #include <linux/lis3lv02d.h> | ||
| 39 | #include <linux/pda_power.h> | ||
| 40 | #include <linux/power_supply.h> | ||
| 41 | #include <linux/regulator/max8660.h> | ||
| 42 | #include <linux/regulator/machine.h> | ||
| 43 | #include <linux/regulator/fixed.h> | ||
| 44 | #include <linux/regulator/consumer.h> | ||
| 45 | #include <linux/delay.h> | ||
| 46 | |||
| 47 | #include <asm/system_info.h> | ||
| 48 | |||
| 49 | #include <asm/mach-types.h> | ||
| 50 | #include <asm/mach/arch.h> | ||
| 51 | |||
| 52 | #include "pxa300.h" | ||
| 53 | #include <linux/platform_data/usb-ohci-pxa27x.h> | ||
| 54 | #include <linux/platform_data/video-pxafb.h> | ||
| 55 | #include <linux/platform_data/mmc-pxamci.h> | ||
| 56 | #include <linux/platform_data/mtd-nand-pxa3xx.h> | ||
| 57 | |||
| 58 | #include "generic.h" | ||
| 59 | #include "devices.h" | ||
| 60 | |||
| 61 | /* common GPIO definitions */ | ||
| 62 | |||
| 63 | /* inputs */ | ||
| 64 | #define GPIO_ON_OFF (14) | ||
| 65 | #define GPIO_VOLENC_A (19) | ||
| 66 | #define GPIO_VOLENC_B (20) | ||
| 67 | #define GPIO_CHARGE_DONE (23) | ||
| 68 | #define GPIO_CHARGE_IND (27) | ||
| 69 | #define GPIO_TOUCH_IRQ (32) | ||
| 70 | #define GPIO_ETH_IRQ (40) | ||
| 71 | #define GPIO_SPI_MISO (98) | ||
| 72 | #define GPIO_ACCEL_IRQ (104) | ||
| 73 | #define GPIO_RESCUE_BOOT (115) | ||
| 74 | #define GPIO_DOCK_DETECT (116) | ||
| 75 | #define GPIO_KEY1 (117) | ||
| 76 | #define GPIO_KEY2 (118) | ||
| 77 | #define GPIO_KEY3 (119) | ||
| 78 | #define GPIO_CHARGE_USB_OK (112) | ||
| 79 | #define GPIO_CHARGE_DC_OK (101) | ||
| 80 | #define GPIO_CHARGE_USB_SUSP (102) | ||
| 81 | |||
| 82 | /* outputs */ | ||
| 83 | #define GPIO_SHUTDOWN_SUPPLY (16) | ||
| 84 | #define GPIO_SHUTDOWN_BATT (18) | ||
| 85 | #define GPIO_CHRG_PEN2 (31) | ||
| 86 | #define GPIO_TFT_VA_EN (33) | ||
| 87 | #define GPIO_SPDIF_CS (34) | ||
| 88 | #define GPIO_LED2 (35) | ||
| 89 | #define GPIO_LED1 (36) | ||
| 90 | #define GPIO_SPDIF_RESET (38) | ||
| 91 | #define GPIO_SPI_CLK (95) | ||
| 92 | #define GPIO_MCLK_DAC_CS (96) | ||
| 93 | #define GPIO_SPI_MOSI (97) | ||
| 94 | #define GPIO_W1_PULLUP_ENABLE (105) | ||
| 95 | #define GPIO_DISPLAY_ENABLE (106) | ||
| 96 | #define GPIO_MCLK_RESET (111) | ||
| 97 | #define GPIO_W2W_RESET (113) | ||
| 98 | #define GPIO_W2W_PDN (114) | ||
| 99 | #define GPIO_CODEC_RESET (120) | ||
| 100 | #define GPIO_AUDIO_VA_ENABLE (124) | ||
| 101 | #define GPIO_ACCEL_CS (125) | ||
| 102 | #define GPIO_ONE_WIRE (126) | ||
| 103 | |||
| 104 | /* | ||
| 105 | * GPIO configurations | ||
| 106 | */ | ||
| 107 | static mfp_cfg_t raumfeld_controller_pin_config[] __initdata = { | ||
| 108 | /* UART1 */ | ||
| 109 | GPIO77_UART1_RXD, | ||
| 110 | GPIO78_UART1_TXD, | ||
| 111 | GPIO79_UART1_CTS, | ||
| 112 | GPIO81_UART1_DSR, | ||
| 113 | GPIO83_UART1_DTR, | ||
| 114 | GPIO84_UART1_RTS, | ||
| 115 | |||
| 116 | /* UART3 */ | ||
| 117 | GPIO110_UART3_RXD, | ||
| 118 | |||
| 119 | /* USB Host */ | ||
| 120 | GPIO0_2_USBH_PEN, | ||
| 121 | GPIO1_2_USBH_PWR, | ||
| 122 | |||
| 123 | /* I2C */ | ||
| 124 | GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
| 125 | GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
| 126 | |||
| 127 | /* SPI */ | ||
| 128 | GPIO34_GPIO, /* SPDIF_CS */ | ||
| 129 | GPIO96_GPIO, /* MCLK_CS */ | ||
| 130 | GPIO125_GPIO, /* ACCEL_CS */ | ||
| 131 | |||
| 132 | /* MMC */ | ||
| 133 | GPIO3_MMC1_DAT0, | ||
| 134 | GPIO4_MMC1_DAT1, | ||
| 135 | GPIO5_MMC1_DAT2, | ||
| 136 | GPIO6_MMC1_DAT3, | ||
| 137 | GPIO7_MMC1_CLK, | ||
| 138 | GPIO8_MMC1_CMD, | ||
| 139 | |||
| 140 | /* One-wire */ | ||
| 141 | GPIO126_GPIO | MFP_LPM_FLOAT, | ||
| 142 | GPIO105_GPIO | MFP_PULL_LOW | MFP_LPM_PULL_LOW, | ||
| 143 | |||
| 144 | /* CHRG_USB_OK */ | ||
| 145 | GPIO101_GPIO | MFP_PULL_HIGH, | ||
| 146 | /* CHRG_USB_OK */ | ||
| 147 | GPIO112_GPIO | MFP_PULL_HIGH, | ||
| 148 | /* CHRG_USB_SUSP */ | ||
| 149 | GPIO102_GPIO, | ||
| 150 | /* DISPLAY_ENABLE */ | ||
| 151 | GPIO106_GPIO, | ||
| 152 | /* DOCK_DETECT */ | ||
| 153 | GPIO116_GPIO | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
| 154 | |||
| 155 | /* LCD */ | ||
| 156 | GPIO54_LCD_LDD_0, | ||
| 157 | GPIO55_LCD_LDD_1, | ||
| 158 | GPIO56_LCD_LDD_2, | ||
| 159 | GPIO57_LCD_LDD_3, | ||
| 160 | GPIO58_LCD_LDD_4, | ||
| 161 | GPIO59_LCD_LDD_5, | ||
| 162 | GPIO60_LCD_LDD_6, | ||
| 163 | GPIO61_LCD_LDD_7, | ||
| 164 | GPIO62_LCD_LDD_8, | ||
| 165 | GPIO63_LCD_LDD_9, | ||
| 166 | GPIO64_LCD_LDD_10, | ||
| 167 | GPIO65_LCD_LDD_11, | ||
| 168 | GPIO66_LCD_LDD_12, | ||
| 169 | GPIO67_LCD_LDD_13, | ||
| 170 | GPIO68_LCD_LDD_14, | ||
| 171 | GPIO69_LCD_LDD_15, | ||
| 172 | GPIO70_LCD_LDD_16, | ||
| 173 | GPIO71_LCD_LDD_17, | ||
| 174 | GPIO72_LCD_FCLK, | ||
| 175 | GPIO73_LCD_LCLK, | ||
| 176 | GPIO74_LCD_PCLK, | ||
| 177 | GPIO75_LCD_BIAS, | ||
| 178 | }; | ||
| 179 | |||
| 180 | static mfp_cfg_t raumfeld_connector_pin_config[] __initdata = { | ||
| 181 | /* UART1 */ | ||
| 182 | GPIO77_UART1_RXD, | ||
| 183 | GPIO78_UART1_TXD, | ||
| 184 | GPIO79_UART1_CTS, | ||
| 185 | GPIO81_UART1_DSR, | ||
| 186 | GPIO83_UART1_DTR, | ||
| 187 | GPIO84_UART1_RTS, | ||
| 188 | |||
| 189 | /* UART3 */ | ||
| 190 | GPIO110_UART3_RXD, | ||
| 191 | |||
| 192 | /* USB Host */ | ||
| 193 | GPIO0_2_USBH_PEN, | ||
| 194 | GPIO1_2_USBH_PWR, | ||
| 195 | |||
| 196 | /* I2C */ | ||
| 197 | GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
| 198 | GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
| 199 | |||
| 200 | /* SPI */ | ||
| 201 | GPIO34_GPIO, /* SPDIF_CS */ | ||
| 202 | GPIO96_GPIO, /* MCLK_CS */ | ||
| 203 | GPIO125_GPIO, /* ACCEL_CS */ | ||
| 204 | |||
| 205 | /* MMC */ | ||
| 206 | GPIO3_MMC1_DAT0, | ||
| 207 | GPIO4_MMC1_DAT1, | ||
| 208 | GPIO5_MMC1_DAT2, | ||
| 209 | GPIO6_MMC1_DAT3, | ||
| 210 | GPIO7_MMC1_CLK, | ||
| 211 | GPIO8_MMC1_CMD, | ||
| 212 | |||
| 213 | /* Ethernet */ | ||
| 214 | GPIO1_nCS2, /* CS */ | ||
| 215 | GPIO40_GPIO | MFP_PULL_HIGH, /* IRQ */ | ||
| 216 | |||
| 217 | /* SSP for I2S */ | ||
| 218 | GPIO85_SSP1_SCLK, | ||
| 219 | GPIO89_SSP1_EXTCLK, | ||
| 220 | GPIO86_SSP1_FRM, | ||
| 221 | GPIO87_SSP1_TXD, | ||
| 222 | GPIO88_SSP1_RXD, | ||
| 223 | GPIO90_SSP1_SYSCLK, | ||
| 224 | |||
| 225 | /* SSP2 for S/PDIF */ | ||
| 226 | GPIO25_SSP2_SCLK, | ||
| 227 | GPIO26_SSP2_FRM, | ||
| 228 | GPIO27_SSP2_TXD, | ||
| 229 | GPIO29_SSP2_EXTCLK, | ||
| 230 | |||
| 231 | /* LEDs */ | ||
| 232 | GPIO35_GPIO | MFP_LPM_PULL_LOW, | ||
| 233 | GPIO36_GPIO | MFP_LPM_DRIVE_HIGH, | ||
| 234 | }; | ||
| 235 | |||
| 236 | static mfp_cfg_t raumfeld_speaker_pin_config[] __initdata = { | ||
| 237 | /* UART1 */ | ||
| 238 | GPIO77_UART1_RXD, | ||
| 239 | GPIO78_UART1_TXD, | ||
| 240 | GPIO79_UART1_CTS, | ||
| 241 | GPIO81_UART1_DSR, | ||
| 242 | GPIO83_UART1_DTR, | ||
| 243 | GPIO84_UART1_RTS, | ||
| 244 | |||
| 245 | /* UART3 */ | ||
| 246 | GPIO110_UART3_RXD, | ||
| 247 | |||
| 248 | /* USB Host */ | ||
| 249 | GPIO0_2_USBH_PEN, | ||
| 250 | GPIO1_2_USBH_PWR, | ||
| 251 | |||
| 252 | /* I2C */ | ||
| 253 | GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
| 254 | GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
| 255 | |||
| 256 | /* SPI */ | ||
| 257 | GPIO34_GPIO, /* SPDIF_CS */ | ||
| 258 | GPIO96_GPIO, /* MCLK_CS */ | ||
| 259 | GPIO125_GPIO, /* ACCEL_CS */ | ||
| 260 | |||
| 261 | /* MMC */ | ||
| 262 | GPIO3_MMC1_DAT0, | ||
| 263 | GPIO4_MMC1_DAT1, | ||
| 264 | GPIO5_MMC1_DAT2, | ||
| 265 | GPIO6_MMC1_DAT3, | ||
| 266 | GPIO7_MMC1_CLK, | ||
| 267 | GPIO8_MMC1_CMD, | ||
| 268 | |||
| 269 | /* Ethernet */ | ||
| 270 | GPIO1_nCS2, /* CS */ | ||
| 271 | GPIO40_GPIO | MFP_PULL_HIGH, /* IRQ */ | ||
| 272 | |||
| 273 | /* SSP for I2S */ | ||
| 274 | GPIO85_SSP1_SCLK, | ||
| 275 | GPIO89_SSP1_EXTCLK, | ||
| 276 | GPIO86_SSP1_FRM, | ||
| 277 | GPIO87_SSP1_TXD, | ||
| 278 | GPIO88_SSP1_RXD, | ||
| 279 | GPIO90_SSP1_SYSCLK, | ||
| 280 | |||
| 281 | /* LEDs */ | ||
| 282 | GPIO35_GPIO | MFP_LPM_PULL_LOW, | ||
| 283 | GPIO36_GPIO | MFP_LPM_DRIVE_HIGH, | ||
| 284 | }; | ||
| 285 | |||
| 286 | /* | ||
| 287 | * SMSC LAN9220 Ethernet | ||
| 288 | */ | ||
| 289 | |||
| 290 | static struct resource smc91x_resources[] = { | ||
| 291 | { | ||
| 292 | .start = PXA3xx_CS2_PHYS, | ||
| 293 | .end = PXA3xx_CS2_PHYS + 0xfffff, | ||
| 294 | .flags = IORESOURCE_MEM, | ||
| 295 | }, | ||
| 296 | { | ||
| 297 | .start = PXA_GPIO_TO_IRQ(GPIO_ETH_IRQ), | ||
| 298 | .end = PXA_GPIO_TO_IRQ(GPIO_ETH_IRQ), | ||
| 299 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | ||
| 300 | } | ||
| 301 | }; | ||
| 302 | |||
| 303 | static struct smsc911x_platform_config raumfeld_smsc911x_config = { | ||
| 304 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
| 305 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
| 306 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
| 307 | .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, | ||
| 308 | }; | ||
| 309 | |||
| 310 | static struct platform_device smc91x_device = { | ||
| 311 | .name = "smsc911x", | ||
| 312 | .id = -1, | ||
| 313 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
| 314 | .resource = smc91x_resources, | ||
| 315 | .dev = { | ||
| 316 | .platform_data = &raumfeld_smsc911x_config, | ||
| 317 | } | ||
| 318 | }; | ||
| 319 | |||
| 320 | /** | ||
| 321 | * NAND | ||
| 322 | */ | ||
| 323 | |||
| 324 | static struct mtd_partition raumfeld_nand_partitions[] = { | ||
| 325 | { | ||
| 326 | .name = "Bootloader", | ||
| 327 | .offset = 0, | ||
| 328 | .size = 0xa0000, | ||
| 329 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
| 330 | }, | ||
| 331 | { | ||
| 332 | .name = "BootloaderEnvironment", | ||
| 333 | .offset = 0xa0000, | ||
| 334 | .size = 0x20000, | ||
| 335 | }, | ||
| 336 | { | ||
| 337 | .name = "BootloaderSplashScreen", | ||
| 338 | .offset = 0xc0000, | ||
| 339 | .size = 0x60000, | ||
| 340 | }, | ||
| 341 | { | ||
| 342 | .name = "UBI", | ||
| 343 | .offset = 0x120000, | ||
| 344 | .size = MTDPART_SIZ_FULL, | ||
| 345 | }, | ||
| 346 | }; | ||
| 347 | |||
| 348 | static struct pxa3xx_nand_platform_data raumfeld_nand_info = { | ||
| 349 | .keep_config = 1, | ||
| 350 | .parts = raumfeld_nand_partitions, | ||
| 351 | .nr_parts = ARRAY_SIZE(raumfeld_nand_partitions), | ||
| 352 | }; | ||
| 353 | |||
| 354 | /** | ||
| 355 | * USB (OHCI) support | ||
| 356 | */ | ||
| 357 | |||
| 358 | static struct pxaohci_platform_data raumfeld_ohci_info = { | ||
| 359 | .port_mode = PMM_GLOBAL_MODE, | ||
| 360 | .flags = ENABLE_PORT1, | ||
| 361 | }; | ||
| 362 | |||
| 363 | /** | ||
| 364 | * Rotary encoder input device | ||
| 365 | */ | ||
| 366 | |||
| 367 | static struct gpiod_lookup_table raumfeld_rotary_gpios_table = { | ||
| 368 | .dev_id = "rotary-encoder.0", | ||
| 369 | .table = { | ||
| 370 | GPIO_LOOKUP_IDX("gpio-0", | ||
| 371 | GPIO_VOLENC_A, NULL, 0, GPIO_ACTIVE_LOW), | ||
| 372 | GPIO_LOOKUP_IDX("gpio-0", | ||
| 373 | GPIO_VOLENC_B, NULL, 1, GPIO_ACTIVE_HIGH), | ||
| 374 | { }, | ||
| 375 | }, | ||
| 376 | }; | ||
| 377 | |||
| 378 | static const struct property_entry raumfeld_rotary_properties[] __initconst = { | ||
| 379 | PROPERTY_ENTRY_U32("rotary-encoder,steps-per-period", 24), | ||
| 380 | PROPERTY_ENTRY_U32("linux,axis", REL_X), | ||
| 381 | PROPERTY_ENTRY_U32("rotary-encoder,relative_axis", 1), | ||
| 382 | { }, | ||
| 383 | }; | ||
| 384 | |||
| 385 | static struct platform_device rotary_encoder_device = { | ||
| 386 | .name = "rotary-encoder", | ||
| 387 | .id = 0, | ||
| 388 | }; | ||
| 389 | |||
| 390 | /** | ||
| 391 | * GPIO buttons | ||
| 392 | */ | ||
| 393 | |||
| 394 | static struct gpio_keys_button gpio_keys_button[] = { | ||
| 395 | { | ||
| 396 | .code = KEY_F1, | ||
| 397 | .type = EV_KEY, | ||
| 398 | .gpio = GPIO_KEY1, | ||
| 399 | .active_low = 1, | ||
| 400 | .wakeup = 0, | ||
| 401 | .debounce_interval = 5, /* ms */ | ||
| 402 | .desc = "Button 1", | ||
| 403 | }, | ||
| 404 | { | ||
| 405 | .code = KEY_F2, | ||
| 406 | .type = EV_KEY, | ||
| 407 | .gpio = GPIO_KEY2, | ||
| 408 | .active_low = 1, | ||
| 409 | .wakeup = 0, | ||
| 410 | .debounce_interval = 5, /* ms */ | ||
| 411 | .desc = "Button 2", | ||
| 412 | }, | ||
| 413 | { | ||
| 414 | .code = KEY_F3, | ||
| 415 | .type = EV_KEY, | ||
| 416 | .gpio = GPIO_KEY3, | ||
| 417 | .active_low = 1, | ||
| 418 | .wakeup = 0, | ||
| 419 | .debounce_interval = 5, /* ms */ | ||
| 420 | .desc = "Button 3", | ||
| 421 | }, | ||
| 422 | { | ||
| 423 | .code = KEY_F4, | ||
| 424 | .type = EV_KEY, | ||
| 425 | .gpio = GPIO_RESCUE_BOOT, | ||
| 426 | .active_low = 0, | ||
| 427 | .wakeup = 0, | ||
| 428 | .debounce_interval = 5, /* ms */ | ||
| 429 | .desc = "rescue boot button", | ||
| 430 | }, | ||
| 431 | { | ||
| 432 | .code = KEY_F5, | ||
| 433 | .type = EV_KEY, | ||
| 434 | .gpio = GPIO_DOCK_DETECT, | ||
| 435 | .active_low = 1, | ||
| 436 | .wakeup = 0, | ||
| 437 | .debounce_interval = 5, /* ms */ | ||
| 438 | .desc = "dock detect", | ||
| 439 | }, | ||
| 440 | { | ||
| 441 | .code = KEY_F6, | ||
| 442 | .type = EV_KEY, | ||
| 443 | .gpio = GPIO_ON_OFF, | ||
| 444 | .active_low = 0, | ||
| 445 | .wakeup = 0, | ||
| 446 | .debounce_interval = 5, /* ms */ | ||
| 447 | .desc = "on_off button", | ||
| 448 | }, | ||
| 449 | }; | ||
| 450 | |||
| 451 | static struct gpio_keys_platform_data gpio_keys_platform_data = { | ||
| 452 | .buttons = gpio_keys_button, | ||
| 453 | .nbuttons = ARRAY_SIZE(gpio_keys_button), | ||
| 454 | .rep = 0, | ||
| 455 | }; | ||
| 456 | |||
| 457 | static struct platform_device raumfeld_gpio_keys_device = { | ||
| 458 | .name = "gpio-keys", | ||
| 459 | .id = -1, | ||
| 460 | .dev = { | ||
| 461 | .platform_data = &gpio_keys_platform_data, | ||
| 462 | } | ||
| 463 | }; | ||
| 464 | |||
| 465 | /** | ||
| 466 | * GPIO LEDs | ||
| 467 | */ | ||
| 468 | |||
| 469 | static struct gpio_led raumfeld_leds[] = { | ||
| 470 | { | ||
| 471 | .name = "raumfeld:1", | ||
| 472 | .gpio = GPIO_LED1, | ||
| 473 | .active_low = 1, | ||
| 474 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
| 475 | }, | ||
| 476 | { | ||
| 477 | .name = "raumfeld:2", | ||
| 478 | .gpio = GPIO_LED2, | ||
| 479 | .active_low = 0, | ||
| 480 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
| 481 | } | ||
| 482 | }; | ||
| 483 | |||
| 484 | static struct gpio_led_platform_data raumfeld_led_platform_data = { | ||
| 485 | .leds = raumfeld_leds, | ||
| 486 | .num_leds = ARRAY_SIZE(raumfeld_leds), | ||
| 487 | }; | ||
| 488 | |||
| 489 | static struct platform_device raumfeld_led_device = { | ||
| 490 | .name = "leds-gpio", | ||
| 491 | .id = -1, | ||
| 492 | .dev = { | ||
| 493 | .platform_data = &raumfeld_led_platform_data, | ||
| 494 | }, | ||
| 495 | }; | ||
| 496 | |||
| 497 | /** | ||
| 498 | * One-wire (W1 bus) support | ||
| 499 | */ | ||
| 500 | |||
| 501 | static void w1_enable_external_pullup(int enable) | ||
| 502 | { | ||
| 503 | gpio_set_value(GPIO_W1_PULLUP_ENABLE, enable); | ||
| 504 | msleep(100); | ||
| 505 | } | ||
| 506 | |||
| 507 | static struct gpiod_lookup_table raumfeld_w1_gpiod_table = { | ||
| 508 | .dev_id = "w1-gpio", | ||
| 509 | .table = { | ||
| 510 | GPIO_LOOKUP_IDX("gpio-pxa", GPIO_ONE_WIRE, NULL, 0, | ||
| 511 | GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN), | ||
| 512 | }, | ||
| 513 | }; | ||
| 514 | |||
| 515 | static struct w1_gpio_platform_data w1_gpio_platform_data = { | ||
| 516 | .enable_external_pullup = w1_enable_external_pullup, | ||
| 517 | }; | ||
| 518 | |||
| 519 | static struct platform_device raumfeld_w1_gpio_device = { | ||
| 520 | .name = "w1-gpio", | ||
| 521 | .dev = { | ||
| 522 | .platform_data = &w1_gpio_platform_data | ||
| 523 | } | ||
| 524 | }; | ||
| 525 | |||
| 526 | static void __init raumfeld_w1_init(void) | ||
| 527 | { | ||
| 528 | int ret = gpio_request(GPIO_W1_PULLUP_ENABLE, | ||
| 529 | "W1 external pullup enable"); | ||
| 530 | |||
| 531 | if (ret < 0) | ||
| 532 | pr_warn("Unable to request GPIO_W1_PULLUP_ENABLE\n"); | ||
| 533 | else | ||
| 534 | gpio_direction_output(GPIO_W1_PULLUP_ENABLE, 0); | ||
| 535 | |||
| 536 | gpiod_add_lookup_table(&raumfeld_w1_gpiod_table); | ||
| 537 | platform_device_register(&raumfeld_w1_gpio_device); | ||
| 538 | } | ||
| 539 | |||
| 540 | /** | ||
| 541 | * Framebuffer device | ||
| 542 | */ | ||
| 543 | |||
| 544 | static struct pwm_lookup raumfeld_pwm_lookup[] = { | ||
| 545 | PWM_LOOKUP("pxa27x-pwm.0", 0, "pwm-backlight", NULL, 10000, | ||
| 546 | PWM_POLARITY_NORMAL), | ||
| 547 | }; | ||
| 548 | |||
| 549 | /* PWM controlled backlight */ | ||
| 550 | static struct platform_pwm_backlight_data raumfeld_pwm_backlight_data = { | ||
| 551 | .max_brightness = 100, | ||
| 552 | .dft_brightness = 100, | ||
| 553 | .enable_gpio = -1, | ||
| 554 | }; | ||
| 555 | |||
| 556 | static struct platform_device raumfeld_pwm_backlight_device = { | ||
| 557 | .name = "pwm-backlight", | ||
| 558 | .dev = { | ||
| 559 | .parent = &pxa27x_device_pwm0.dev, | ||
| 560 | .platform_data = &raumfeld_pwm_backlight_data, | ||
| 561 | } | ||
| 562 | }; | ||
| 563 | |||
| 564 | /* LT3593 controlled backlight */ | ||
| 565 | static struct gpio_led raumfeld_lt3593_led = { | ||
| 566 | .name = "backlight", | ||
| 567 | .gpio = mfp_to_gpio(MFP_PIN_GPIO17), | ||
| 568 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
| 569 | }; | ||
| 570 | |||
| 571 | static struct gpio_led_platform_data raumfeld_lt3593_platform_data = { | ||
| 572 | .leds = &raumfeld_lt3593_led, | ||
| 573 | .num_leds = 1, | ||
| 574 | }; | ||
| 575 | |||
| 576 | static struct platform_device raumfeld_lt3593_device = { | ||
| 577 | .name = "leds-lt3593", | ||
| 578 | .id = -1, | ||
| 579 | .dev = { | ||
| 580 | .platform_data = &raumfeld_lt3593_platform_data, | ||
| 581 | }, | ||
| 582 | }; | ||
| 583 | |||
| 584 | static struct pxafb_mode_info sharp_lq043t3dx02_mode = { | ||
| 585 | .pixclock = 111000, | ||
| 586 | .xres = 480, | ||
| 587 | .yres = 272, | ||
| 588 | .bpp = 16, | ||
| 589 | .hsync_len = 41, | ||
| 590 | .left_margin = 2, | ||
| 591 | .right_margin = 1, | ||
| 592 | .vsync_len = 10, | ||
| 593 | .upper_margin = 3, | ||
| 594 | .lower_margin = 1, | ||
| 595 | .sync = 0, | ||
| 596 | }; | ||
| 597 | |||
| 598 | static struct pxafb_mach_info raumfeld_sharp_lcd_info = { | ||
| 599 | .modes = &sharp_lq043t3dx02_mode, | ||
| 600 | .num_modes = 1, | ||
| 601 | .video_mem_size = 0x400000, | ||
| 602 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, | ||
| 603 | #ifdef CONFIG_PXA3XX_GCU | ||
| 604 | .acceleration_enabled = 1, | ||
| 605 | #endif | ||
| 606 | }; | ||
| 607 | |||
| 608 | static void __init raumfeld_lcd_init(void) | ||
| 609 | { | ||
| 610 | int ret; | ||
| 611 | |||
| 612 | ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable"); | ||
| 613 | if (ret < 0) | ||
| 614 | pr_warn("Unable to request GPIO_TFT_VA_EN\n"); | ||
| 615 | else | ||
| 616 | gpio_direction_output(GPIO_TFT_VA_EN, 1); | ||
| 617 | |||
| 618 | msleep(100); | ||
| 619 | |||
| 620 | ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable"); | ||
| 621 | if (ret < 0) | ||
| 622 | pr_warn("Unable to request GPIO_DISPLAY_ENABLE\n"); | ||
| 623 | else | ||
| 624 | gpio_direction_output(GPIO_DISPLAY_ENABLE, 1); | ||
| 625 | |||
| 626 | /* Hardware revision 2 has the backlight regulator controlled | ||
| 627 | * by an LT3593, earlier and later devices use PWM for that. */ | ||
| 628 | if ((system_rev & 0xff) == 2) { | ||
| 629 | platform_device_register(&raumfeld_lt3593_device); | ||
| 630 | } else { | ||
| 631 | mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT; | ||
| 632 | pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1); | ||
| 633 | pwm_add_table(raumfeld_pwm_lookup, | ||
| 634 | ARRAY_SIZE(raumfeld_pwm_lookup)); | ||
| 635 | platform_device_register(&raumfeld_pwm_backlight_device); | ||
| 636 | } | ||
| 637 | |||
| 638 | pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info); | ||
| 639 | platform_device_register(&pxa3xx_device_gcu); | ||
| 640 | } | ||
| 641 | |||
| 642 | /** | ||
| 643 | * SPI devices | ||
| 644 | */ | ||
| 645 | |||
| 646 | static struct spi_gpio_platform_data raumfeld_spi_platform_data = { | ||
| 647 | .num_chipselect = 3, | ||
| 648 | }; | ||
| 649 | |||
| 650 | static struct platform_device raumfeld_spi_device = { | ||
| 651 | .name = "spi_gpio", | ||
| 652 | .id = 0, | ||
| 653 | .dev = { | ||
| 654 | .platform_data = &raumfeld_spi_platform_data, | ||
| 655 | } | ||
| 656 | }; | ||
| 657 | |||
| 658 | static struct gpiod_lookup_table raumfeld_spi_gpiod_table = { | ||
| 659 | .dev_id = "spi_gpio", | ||
| 660 | .table = { | ||
| 661 | GPIO_LOOKUP("gpio-0", GPIO_SPI_CLK, | ||
| 662 | "sck", GPIO_ACTIVE_HIGH), | ||
| 663 | GPIO_LOOKUP("gpio-0", GPIO_SPI_MOSI, | ||
| 664 | "mosi", GPIO_ACTIVE_HIGH), | ||
| 665 | GPIO_LOOKUP("gpio-0", GPIO_SPI_MISO, | ||
| 666 | "miso", GPIO_ACTIVE_HIGH), | ||
| 667 | GPIO_LOOKUP_IDX("gpio-0", GPIO_SPDIF_CS, | ||
| 668 | "cs", 0, GPIO_ACTIVE_HIGH), | ||
| 669 | GPIO_LOOKUP_IDX("gpio-0", GPIO_ACCEL_CS, | ||
| 670 | "cs", 1, GPIO_ACTIVE_HIGH), | ||
| 671 | GPIO_LOOKUP_IDX("gpio-0", GPIO_MCLK_DAC_CS, | ||
| 672 | "cs", 2, GPIO_ACTIVE_HIGH), | ||
| 673 | { }, | ||
| 674 | }, | ||
| 675 | }; | ||
| 676 | |||
| 677 | static struct lis3lv02d_platform_data lis3_pdata = { | ||
| 678 | .click_flags = LIS3_CLICK_SINGLE_X | | ||
| 679 | LIS3_CLICK_SINGLE_Y | | ||
| 680 | LIS3_CLICK_SINGLE_Z, | ||
| 681 | .irq_cfg = LIS3_IRQ1_CLICK | LIS3_IRQ2_CLICK, | ||
| 682 | .wakeup_flags = LIS3_WAKEUP_X_LO | LIS3_WAKEUP_X_HI | | ||
| 683 | LIS3_WAKEUP_Y_LO | LIS3_WAKEUP_Y_HI | | ||
| 684 | LIS3_WAKEUP_Z_LO | LIS3_WAKEUP_Z_HI, | ||
| 685 | .wakeup_thresh = 10, | ||
| 686 | .click_thresh_x = 10, | ||
| 687 | .click_thresh_y = 10, | ||
| 688 | .click_thresh_z = 10, | ||
| 689 | }; | ||
| 690 | |||
| 691 | #define SPI_AK4104 \ | ||
| 692 | { \ | ||
| 693 | .modalias = "ak4104-codec", \ | ||
| 694 | .max_speed_hz = 10000, \ | ||
| 695 | .bus_num = 0, \ | ||
| 696 | .chip_select = 0, \ | ||
| 697 | } | ||
| 698 | |||
| 699 | #define SPI_LIS3 \ | ||
| 700 | { \ | ||
| 701 | .modalias = "lis3lv02d_spi", \ | ||
| 702 | .max_speed_hz = 1000000, \ | ||
| 703 | .bus_num = 0, \ | ||
| 704 | .chip_select = 1, \ | ||
| 705 | .platform_data = &lis3_pdata, \ | ||
| 706 | .irq = PXA_GPIO_TO_IRQ(GPIO_ACCEL_IRQ), \ | ||
| 707 | } | ||
| 708 | |||
| 709 | #define SPI_DAC7512 \ | ||
| 710 | { \ | ||
| 711 | .modalias = "dac7512", \ | ||
| 712 | .max_speed_hz = 1000000, \ | ||
| 713 | .bus_num = 0, \ | ||
| 714 | .chip_select = 2, \ | ||
| 715 | } | ||
| 716 | |||
| 717 | static struct spi_board_info connector_spi_devices[] __initdata = { | ||
| 718 | SPI_AK4104, | ||
| 719 | SPI_DAC7512, | ||
| 720 | }; | ||
| 721 | |||
| 722 | static struct spi_board_info speaker_spi_devices[] __initdata = { | ||
| 723 | SPI_DAC7512, | ||
| 724 | }; | ||
| 725 | |||
| 726 | static struct spi_board_info controller_spi_devices[] __initdata = { | ||
| 727 | SPI_LIS3, | ||
| 728 | }; | ||
| 729 | |||
| 730 | /** | ||
| 731 | * MMC for Marvell Libertas 8688 via SDIO | ||
| 732 | */ | ||
| 733 | |||
| 734 | static int raumfeld_mci_init(struct device *dev, irq_handler_t isr, void *data) | ||
| 735 | { | ||
| 736 | gpio_set_value(GPIO_W2W_RESET, 1); | ||
| 737 | gpio_set_value(GPIO_W2W_PDN, 1); | ||
| 738 | |||
| 739 | return 0; | ||
| 740 | } | ||
| 741 | |||
| 742 | static void raumfeld_mci_exit(struct device *dev, void *data) | ||
| 743 | { | ||
| 744 | gpio_set_value(GPIO_W2W_RESET, 0); | ||
| 745 | gpio_set_value(GPIO_W2W_PDN, 0); | ||
| 746 | } | ||
| 747 | |||
| 748 | static struct pxamci_platform_data raumfeld_mci_platform_data = { | ||
| 749 | .init = raumfeld_mci_init, | ||
| 750 | .exit = raumfeld_mci_exit, | ||
| 751 | .detect_delay_ms = 200, | ||
| 752 | }; | ||
| 753 | |||
| 754 | /* | ||
| 755 | * External power / charge logic | ||
| 756 | */ | ||
| 757 | |||
| 758 | static int power_supply_init(struct device *dev) | ||
| 759 | { | ||
| 760 | return 0; | ||
| 761 | } | ||
| 762 | |||
| 763 | static void power_supply_exit(struct device *dev) | ||
| 764 | { | ||
| 765 | } | ||
| 766 | |||
| 767 | static int raumfeld_is_ac_online(void) | ||
| 768 | { | ||
| 769 | return !gpio_get_value(GPIO_CHARGE_DC_OK); | ||
| 770 | } | ||
| 771 | |||
| 772 | static int raumfeld_is_usb_online(void) | ||
| 773 | { | ||
| 774 | return 0; | ||
| 775 | } | ||
| 776 | |||
| 777 | static char *raumfeld_power_supplicants[] = { "ds2760-battery.0" }; | ||
| 778 | |||
| 779 | static void raumfeld_power_signal_charged(void) | ||
| 780 | { | ||
| 781 | struct power_supply *psy = | ||
| 782 | power_supply_get_by_name(raumfeld_power_supplicants[0]); | ||
| 783 | |||
| 784 | if (psy) { | ||
| 785 | power_supply_set_battery_charged(psy); | ||
| 786 | power_supply_put(psy); | ||
| 787 | } | ||
| 788 | } | ||
| 789 | |||
| 790 | static int raumfeld_power_resume(void) | ||
| 791 | { | ||
| 792 | /* check if GPIO_CHARGE_DONE went low while we were sleeping */ | ||
| 793 | if (!gpio_get_value(GPIO_CHARGE_DONE)) | ||
| 794 | raumfeld_power_signal_charged(); | ||
| 795 | |||
| 796 | return 0; | ||
| 797 | } | ||
| 798 | |||
| 799 | static struct pda_power_pdata power_supply_info = { | ||
| 800 | .init = power_supply_init, | ||
| 801 | .is_ac_online = raumfeld_is_ac_online, | ||
| 802 | .is_usb_online = raumfeld_is_usb_online, | ||
| 803 | .exit = power_supply_exit, | ||
| 804 | .supplied_to = raumfeld_power_supplicants, | ||
| 805 | .num_supplicants = ARRAY_SIZE(raumfeld_power_supplicants), | ||
| 806 | .resume = raumfeld_power_resume, | ||
| 807 | }; | ||
| 808 | |||
| 809 | static struct resource power_supply_resources[] = { | ||
| 810 | { | ||
| 811 | .name = "ac", | ||
| 812 | .flags = IORESOURCE_IRQ | | ||
| 813 | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE, | ||
| 814 | .start = GPIO_CHARGE_DC_OK, | ||
| 815 | .end = GPIO_CHARGE_DC_OK, | ||
| 816 | }, | ||
| 817 | }; | ||
| 818 | |||
| 819 | static irqreturn_t charge_done_irq(int irq, void *dev_id) | ||
| 820 | { | ||
| 821 | raumfeld_power_signal_charged(); | ||
| 822 | return IRQ_HANDLED; | ||
| 823 | } | ||
| 824 | |||
| 825 | static struct platform_device raumfeld_power_supply = { | ||
| 826 | .name = "pda-power", | ||
| 827 | .id = -1, | ||
| 828 | .dev = { | ||
| 829 | .platform_data = &power_supply_info, | ||
| 830 | }, | ||
| 831 | .resource = power_supply_resources, | ||
| 832 | .num_resources = ARRAY_SIZE(power_supply_resources), | ||
| 833 | }; | ||
| 834 | |||
| 835 | static void __init raumfeld_power_init(void) | ||
| 836 | { | ||
| 837 | int ret; | ||
| 838 | |||
| 839 | /* Set PEN2 high to enable maximum charge current */ | ||
| 840 | ret = gpio_request(GPIO_CHRG_PEN2, "CHRG_PEN2"); | ||
| 841 | if (ret < 0) | ||
| 842 | pr_warn("Unable to request GPIO_CHRG_PEN2\n"); | ||
| 843 | else | ||
| 844 | gpio_direction_output(GPIO_CHRG_PEN2, 1); | ||
| 845 | |||
| 846 | ret = gpio_request(GPIO_CHARGE_DC_OK, "CABLE_DC_OK"); | ||
| 847 | if (ret < 0) | ||
| 848 | pr_warn("Unable to request GPIO_CHARGE_DC_OK\n"); | ||
| 849 | |||
| 850 | ret = gpio_request(GPIO_CHARGE_USB_SUSP, "CHARGE_USB_SUSP"); | ||
| 851 | if (ret < 0) | ||
| 852 | pr_warn("Unable to request GPIO_CHARGE_USB_SUSP\n"); | ||
| 853 | else | ||
| 854 | gpio_direction_output(GPIO_CHARGE_USB_SUSP, 0); | ||
| 855 | |||
| 856 | power_supply_resources[0].start = gpio_to_irq(GPIO_CHARGE_DC_OK); | ||
| 857 | power_supply_resources[0].end = gpio_to_irq(GPIO_CHARGE_DC_OK); | ||
| 858 | |||
| 859 | ret = request_irq(gpio_to_irq(GPIO_CHARGE_DONE), | ||
| 860 | &charge_done_irq, IORESOURCE_IRQ_LOWEDGE, | ||
| 861 | "charge_done", NULL); | ||
| 862 | |||
| 863 | if (ret < 0) | ||
| 864 | printk(KERN_ERR "%s: unable to register irq %d\n", __func__, | ||
| 865 | GPIO_CHARGE_DONE); | ||
| 866 | else | ||
| 867 | platform_device_register(&raumfeld_power_supply); | ||
| 868 | } | ||
| 869 | |||
| 870 | /* Fixed regulator for AUDIO_VA, 0-0048 maps to the cs4270 codec device */ | ||
| 871 | |||
| 872 | static struct regulator_consumer_supply audio_va_consumer_supply = | ||
| 873 | REGULATOR_SUPPLY("va", "0-0048"); | ||
| 874 | |||
| 875 | static struct regulator_init_data audio_va_initdata = { | ||
| 876 | .consumer_supplies = &audio_va_consumer_supply, | ||
| 877 | .num_consumer_supplies = 1, | ||
| 878 | .constraints = { | ||
| 879 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
| 880 | }, | ||
| 881 | }; | ||
| 882 | |||
| 883 | static struct fixed_voltage_config audio_va_config = { | ||
| 884 | .supply_name = "audio_va", | ||
| 885 | .microvolts = 5000000, | ||
| 886 | .enabled_at_boot = 0, | ||
| 887 | .init_data = &audio_va_initdata, | ||
| 888 | }; | ||
| 889 | |||
| 890 | static struct platform_device audio_va_device = { | ||
| 891 | .name = "reg-fixed-voltage", | ||
| 892 | .id = 0, | ||
| 893 | .dev = { | ||
| 894 | .platform_data = &audio_va_config, | ||
| 895 | }, | ||
| 896 | }; | ||
| 897 | |||
| 898 | static struct gpiod_lookup_table audio_va_gpiod_table = { | ||
| 899 | .dev_id = "reg-fixed-voltage.0", | ||
| 900 | .table = { | ||
| 901 | GPIO_LOOKUP("gpio-pxa", GPIO_AUDIO_VA_ENABLE, | ||
| 902 | NULL, GPIO_ACTIVE_HIGH), | ||
| 903 | { }, | ||
| 904 | }, | ||
| 905 | }; | ||
| 906 | |||
| 907 | /* Dummy supplies for Codec's VD/VLC */ | ||
| 908 | |||
| 909 | static struct regulator_consumer_supply audio_dummy_supplies[] = { | ||
| 910 | REGULATOR_SUPPLY("vd", "0-0048"), | ||
| 911 | REGULATOR_SUPPLY("vlc", "0-0048"), | ||
| 912 | }; | ||
| 913 | |||
| 914 | static struct regulator_init_data audio_dummy_initdata = { | ||
| 915 | .consumer_supplies = audio_dummy_supplies, | ||
| 916 | .num_consumer_supplies = ARRAY_SIZE(audio_dummy_supplies), | ||
| 917 | .constraints = { | ||
| 918 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
| 919 | }, | ||
| 920 | }; | ||
| 921 | |||
| 922 | static struct fixed_voltage_config audio_dummy_config = { | ||
| 923 | .supply_name = "audio_vd", | ||
| 924 | .microvolts = 3300000, | ||
| 925 | .init_data = &audio_dummy_initdata, | ||
| 926 | }; | ||
| 927 | |||
| 928 | static struct platform_device audio_supply_dummy_device = { | ||
| 929 | .name = "reg-fixed-voltage", | ||
| 930 | .id = 1, | ||
| 931 | .dev = { | ||
| 932 | .platform_data = &audio_dummy_config, | ||
| 933 | }, | ||
| 934 | }; | ||
| 935 | |||
| 936 | static struct platform_device *audio_regulator_devices[] = { | ||
| 937 | &audio_va_device, | ||
| 938 | &audio_supply_dummy_device, | ||
| 939 | }; | ||
| 940 | |||
| 941 | /** | ||
| 942 | * Regulator support via MAX8660 | ||
| 943 | */ | ||
| 944 | |||
| 945 | static struct regulator_consumer_supply vcc_mmc_supply = | ||
| 946 | REGULATOR_SUPPLY("vmmc", "pxa2xx-mci.0"); | ||
| 947 | |||
| 948 | static struct regulator_init_data vcc_mmc_init_data = { | ||
| 949 | .constraints = { | ||
| 950 | .min_uV = 3300000, | ||
| 951 | .max_uV = 3300000, | ||
| 952 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
| 953 | .valid_ops_mask = REGULATOR_CHANGE_STATUS | | ||
| 954 | REGULATOR_CHANGE_VOLTAGE | | ||
| 955 | REGULATOR_CHANGE_MODE, | ||
| 956 | }, | ||
| 957 | .consumer_supplies = &vcc_mmc_supply, | ||
| 958 | .num_consumer_supplies = 1, | ||
| 959 | }; | ||
| 960 | |||
| 961 | static struct max8660_subdev_data max8660_v6_subdev_data = { | ||
| 962 | .id = MAX8660_V6, | ||
| 963 | .name = "vmmc", | ||
| 964 | .platform_data = &vcc_mmc_init_data, | ||
| 965 | }; | ||
| 966 | |||
| 967 | static struct max8660_platform_data max8660_pdata = { | ||
| 968 | .subdevs = &max8660_v6_subdev_data, | ||
| 969 | .num_subdevs = 1, | ||
| 970 | }; | ||
| 971 | |||
| 972 | /** | ||
| 973 | * I2C devices | ||
| 974 | */ | ||
| 975 | |||
| 976 | static struct i2c_board_info raumfeld_pwri2c_board_info = { | ||
| 977 | .type = "max8660", | ||
| 978 | .addr = 0x34, | ||
| 979 | .platform_data = &max8660_pdata, | ||
| 980 | }; | ||
| 981 | |||
| 982 | static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = { | ||
| 983 | .type = "cs4270", | ||
| 984 | .addr = 0x48, | ||
| 985 | }; | ||
| 986 | |||
| 987 | static struct gpiod_lookup_table raumfeld_controller_gpios_table = { | ||
| 988 | .dev_id = "0-000a", | ||
| 989 | .table = { | ||
| 990 | GPIO_LOOKUP("gpio-pxa", | ||
| 991 | GPIO_TOUCH_IRQ, "attn", GPIO_ACTIVE_HIGH), | ||
| 992 | { }, | ||
| 993 | }, | ||
| 994 | }; | ||
| 995 | |||
| 996 | static const struct resource raumfeld_controller_resources[] __initconst = { | ||
| 997 | { | ||
| 998 | .start = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ), | ||
| 999 | .end = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ), | ||
| 1000 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, | ||
| 1001 | }, | ||
| 1002 | }; | ||
| 1003 | |||
| 1004 | static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { | ||
| 1005 | .type = "eeti_ts", | ||
| 1006 | .addr = 0x0a, | ||
| 1007 | .resources = raumfeld_controller_resources, | ||
| 1008 | .num_resources = ARRAY_SIZE(raumfeld_controller_resources), | ||
| 1009 | }; | ||
| 1010 | |||
| 1011 | static struct platform_device *raumfeld_common_devices[] = { | ||
| 1012 | &raumfeld_gpio_keys_device, | ||
| 1013 | &raumfeld_led_device, | ||
| 1014 | &raumfeld_spi_device, | ||
| 1015 | }; | ||
| 1016 | |||
| 1017 | static void __init raumfeld_audio_init(void) | ||
| 1018 | { | ||
| 1019 | int ret; | ||
| 1020 | |||
| 1021 | ret = gpio_request(GPIO_CODEC_RESET, "cs4270 reset"); | ||
| 1022 | if (ret < 0) | ||
| 1023 | pr_warn("unable to request GPIO_CODEC_RESET\n"); | ||
| 1024 | else | ||
| 1025 | gpio_direction_output(GPIO_CODEC_RESET, 1); | ||
| 1026 | |||
| 1027 | ret = gpio_request(GPIO_SPDIF_RESET, "ak4104 s/pdif reset"); | ||
| 1028 | if (ret < 0) | ||
| 1029 | pr_warn("unable to request GPIO_SPDIF_RESET\n"); | ||
| 1030 | else | ||
| 1031 | gpio_direction_output(GPIO_SPDIF_RESET, 1); | ||
| 1032 | |||
| 1033 | ret = gpio_request(GPIO_MCLK_RESET, "MCLK reset"); | ||
| 1034 | if (ret < 0) | ||
| 1035 | pr_warn("unable to request GPIO_MCLK_RESET\n"); | ||
| 1036 | else | ||
| 1037 | gpio_direction_output(GPIO_MCLK_RESET, 1); | ||
| 1038 | |||
| 1039 | gpiod_add_lookup_table(&audio_va_gpiod_table); | ||
| 1040 | platform_add_devices(ARRAY_AND_SIZE(audio_regulator_devices)); | ||
| 1041 | } | ||
| 1042 | |||
| 1043 | static void __init raumfeld_common_init(void) | ||
| 1044 | { | ||
| 1045 | int ret; | ||
| 1046 | |||
| 1047 | /* The on/off button polarity has changed after revision 1 */ | ||
| 1048 | if ((system_rev & 0xff) > 1) { | ||
| 1049 | int i; | ||
| 1050 | |||
| 1051 | for (i = 0; i < ARRAY_SIZE(gpio_keys_button); i++) | ||
| 1052 | if (!strcmp(gpio_keys_button[i].desc, "on_off button")) | ||
| 1053 | gpio_keys_button[i].active_low = 1; | ||
| 1054 | } | ||
| 1055 | |||
| 1056 | enable_irq_wake(IRQ_WAKEUP0); | ||
| 1057 | |||
| 1058 | pxa3xx_set_nand_info(&raumfeld_nand_info); | ||
| 1059 | pxa3xx_set_i2c_power_info(NULL); | ||
| 1060 | pxa_set_ohci_info(&raumfeld_ohci_info); | ||
| 1061 | pxa_set_mci_info(&raumfeld_mci_platform_data); | ||
| 1062 | pxa_set_i2c_info(NULL); | ||
| 1063 | pxa_set_ffuart_info(NULL); | ||
| 1064 | |||
| 1065 | ret = gpio_request(GPIO_W2W_RESET, "Wi2Wi reset"); | ||
| 1066 | if (ret < 0) | ||
| 1067 | pr_warn("Unable to request GPIO_W2W_RESET\n"); | ||
| 1068 | else | ||
| 1069 | gpio_direction_output(GPIO_W2W_RESET, 0); | ||
| 1070 | |||
| 1071 | ret = gpio_request(GPIO_W2W_PDN, "Wi2Wi powerup"); | ||
| 1072 | if (ret < 0) | ||
| 1073 | pr_warn("Unable to request GPIO_W2W_PDN\n"); | ||
| 1074 | else | ||
| 1075 | gpio_direction_output(GPIO_W2W_PDN, 0); | ||
| 1076 | |||
| 1077 | /* this can be used to switch off the device */ | ||
| 1078 | ret = gpio_request(GPIO_SHUTDOWN_SUPPLY, "supply shutdown"); | ||
| 1079 | if (ret < 0) | ||
| 1080 | pr_warn("Unable to request GPIO_SHUTDOWN_SUPPLY\n"); | ||
| 1081 | else | ||
| 1082 | gpio_direction_output(GPIO_SHUTDOWN_SUPPLY, 0); | ||
| 1083 | |||
| 1084 | gpiod_add_lookup_table(&raumfeld_spi_gpiod_table); | ||
| 1085 | platform_add_devices(ARRAY_AND_SIZE(raumfeld_common_devices)); | ||
| 1086 | i2c_register_board_info(1, &raumfeld_pwri2c_board_info, 1); | ||
| 1087 | } | ||
| 1088 | |||
| 1089 | static void __init __maybe_unused raumfeld_controller_init(void) | ||
| 1090 | { | ||
| 1091 | int ret; | ||
| 1092 | |||
| 1093 | pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_controller_pin_config)); | ||
| 1094 | |||
| 1095 | gpiod_add_lookup_table(&raumfeld_rotary_gpios_table); | ||
| 1096 | device_add_properties(&rotary_encoder_device.dev, | ||
| 1097 | raumfeld_rotary_properties); | ||
| 1098 | platform_device_register(&rotary_encoder_device); | ||
| 1099 | |||
| 1100 | spi_register_board_info(ARRAY_AND_SIZE(controller_spi_devices)); | ||
| 1101 | |||
| 1102 | gpiod_add_lookup_table(&raumfeld_controller_gpios_table); | ||
| 1103 | i2c_register_board_info(0, &raumfeld_controller_i2c_board_info, 1); | ||
| 1104 | |||
| 1105 | ret = gpio_request(GPIO_SHUTDOWN_BATT, "battery shutdown"); | ||
| 1106 | if (ret < 0) | ||
| 1107 | pr_warn("Unable to request GPIO_SHUTDOWN_BATT\n"); | ||
| 1108 | else | ||
| 1109 | gpio_direction_output(GPIO_SHUTDOWN_BATT, 0); | ||
| 1110 | |||
| 1111 | raumfeld_common_init(); | ||
| 1112 | raumfeld_power_init(); | ||
| 1113 | raumfeld_lcd_init(); | ||
| 1114 | raumfeld_w1_init(); | ||
| 1115 | } | ||
| 1116 | |||
| 1117 | static void __init __maybe_unused raumfeld_connector_init(void) | ||
| 1118 | { | ||
| 1119 | pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_connector_pin_config)); | ||
| 1120 | spi_register_board_info(ARRAY_AND_SIZE(connector_spi_devices)); | ||
| 1121 | i2c_register_board_info(0, &raumfeld_connector_i2c_board_info, 1); | ||
| 1122 | |||
| 1123 | platform_device_register(&smc91x_device); | ||
| 1124 | |||
| 1125 | raumfeld_audio_init(); | ||
| 1126 | raumfeld_common_init(); | ||
| 1127 | } | ||
| 1128 | |||
| 1129 | static void __init __maybe_unused raumfeld_speaker_init(void) | ||
| 1130 | { | ||
| 1131 | pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_speaker_pin_config)); | ||
| 1132 | spi_register_board_info(ARRAY_AND_SIZE(speaker_spi_devices)); | ||
| 1133 | i2c_register_board_info(0, &raumfeld_connector_i2c_board_info, 1); | ||
| 1134 | |||
| 1135 | platform_device_register(&smc91x_device); | ||
| 1136 | |||
| 1137 | gpiod_add_lookup_table(&raumfeld_rotary_gpios_table); | ||
| 1138 | device_add_properties(&rotary_encoder_device.dev, | ||
| 1139 | raumfeld_rotary_properties); | ||
| 1140 | platform_device_register(&rotary_encoder_device); | ||
| 1141 | |||
| 1142 | raumfeld_audio_init(); | ||
| 1143 | raumfeld_common_init(); | ||
| 1144 | } | ||
| 1145 | |||
| 1146 | /* physical memory regions */ | ||
| 1147 | #define RAUMFELD_SDRAM_BASE 0xa0000000 /* SDRAM region */ | ||
| 1148 | |||
| 1149 | #ifdef CONFIG_MACH_RAUMFELD_RC | ||
| 1150 | MACHINE_START(RAUMFELD_RC, "Raumfeld Controller") | ||
| 1151 | .atag_offset = 0x100, | ||
| 1152 | .init_machine = raumfeld_controller_init, | ||
| 1153 | .map_io = pxa3xx_map_io, | ||
| 1154 | .nr_irqs = PXA_NR_IRQS, | ||
| 1155 | .init_irq = pxa3xx_init_irq, | ||
| 1156 | .handle_irq = pxa3xx_handle_irq, | ||
| 1157 | .init_time = pxa_timer_init, | ||
| 1158 | .restart = pxa_restart, | ||
| 1159 | MACHINE_END | ||
| 1160 | #endif | ||
| 1161 | |||
| 1162 | #ifdef CONFIG_MACH_RAUMFELD_CONNECTOR | ||
| 1163 | MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector") | ||
| 1164 | .atag_offset = 0x100, | ||
| 1165 | .init_machine = raumfeld_connector_init, | ||
| 1166 | .map_io = pxa3xx_map_io, | ||
| 1167 | .nr_irqs = PXA_NR_IRQS, | ||
| 1168 | .init_irq = pxa3xx_init_irq, | ||
| 1169 | .handle_irq = pxa3xx_handle_irq, | ||
| 1170 | .init_time = pxa_timer_init, | ||
| 1171 | .restart = pxa_restart, | ||
| 1172 | MACHINE_END | ||
| 1173 | #endif | ||
| 1174 | |||
| 1175 | #ifdef CONFIG_MACH_RAUMFELD_SPEAKER | ||
| 1176 | MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker") | ||
| 1177 | .atag_offset = 0x100, | ||
| 1178 | .init_machine = raumfeld_speaker_init, | ||
| 1179 | .map_io = pxa3xx_map_io, | ||
| 1180 | .nr_irqs = PXA_NR_IRQS, | ||
| 1181 | .init_irq = pxa3xx_init_irq, | ||
| 1182 | .handle_irq = pxa3xx_handle_irq, | ||
| 1183 | .init_time = pxa_timer_init, | ||
| 1184 | .restart = pxa_restart, | ||
| 1185 | MACHINE_END | ||
| 1186 | #endif | ||
diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c index 058ce73137e8..5d819b6ea428 100644 --- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c +++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c | |||
| @@ -65,16 +65,16 @@ static int osiris_dvs_notify(struct notifier_block *nb, | |||
| 65 | 65 | ||
| 66 | switch (val) { | 66 | switch (val) { |
| 67 | case CPUFREQ_PRECHANGE: | 67 | case CPUFREQ_PRECHANGE: |
| 68 | if (old_dvs & !new_dvs || | 68 | if ((old_dvs && !new_dvs) || |
| 69 | cur_dvs & !new_dvs) { | 69 | (cur_dvs && !new_dvs)) { |
| 70 | pr_debug("%s: exiting dvs\n", __func__); | 70 | pr_debug("%s: exiting dvs\n", __func__); |
| 71 | cur_dvs = false; | 71 | cur_dvs = false; |
| 72 | gpio_set_value(OSIRIS_GPIO_DVS, 1); | 72 | gpio_set_value(OSIRIS_GPIO_DVS, 1); |
| 73 | } | 73 | } |
| 74 | break; | 74 | break; |
| 75 | case CPUFREQ_POSTCHANGE: | 75 | case CPUFREQ_POSTCHANGE: |
| 76 | if (!old_dvs & new_dvs || | 76 | if ((!old_dvs && new_dvs) || |
| 77 | !cur_dvs & new_dvs) { | 77 | (!cur_dvs && new_dvs)) { |
| 78 | pr_debug("entering dvs\n"); | 78 | pr_debug("entering dvs\n"); |
| 79 | cur_dvs = true; | 79 | cur_dvs = true; |
| 80 | gpio_set_value(OSIRIS_GPIO_DVS, 0); | 80 | gpio_set_value(OSIRIS_GPIO_DVS, 0); |
diff --git a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c index 8e50daa99151..dc526ef2e9b3 100644 --- a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +++ b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | struct regulator_quirk { | 40 | struct regulator_quirk { |
| 41 | struct list_head list; | 41 | struct list_head list; |
| 42 | const struct of_device_id *id; | 42 | const struct of_device_id *id; |
| 43 | struct device_node *np; | ||
| 43 | struct of_phandle_args irq_args; | 44 | struct of_phandle_args irq_args; |
| 44 | struct i2c_msg i2c_msg; | 45 | struct i2c_msg i2c_msg; |
| 45 | bool shared; /* IRQ line is shared */ | 46 | bool shared; /* IRQ line is shared */ |
| @@ -101,6 +102,9 @@ static int regulator_quirk_notify(struct notifier_block *nb, | |||
| 101 | if (!pos->shared) | 102 | if (!pos->shared) |
| 102 | continue; | 103 | continue; |
| 103 | 104 | ||
| 105 | if (pos->np->parent != client->dev.parent->of_node) | ||
| 106 | continue; | ||
| 107 | |||
| 104 | dev_info(&client->dev, "clearing %s@0x%02x interrupts\n", | 108 | dev_info(&client->dev, "clearing %s@0x%02x interrupts\n", |
| 105 | pos->id->compatible, pos->i2c_msg.addr); | 109 | pos->id->compatible, pos->i2c_msg.addr); |
| 106 | 110 | ||
| @@ -165,6 +169,7 @@ static int __init rcar_gen2_regulator_quirk(void) | |||
| 165 | memcpy(&quirk->i2c_msg, id->data, sizeof(quirk->i2c_msg)); | 169 | memcpy(&quirk->i2c_msg, id->data, sizeof(quirk->i2c_msg)); |
| 166 | 170 | ||
| 167 | quirk->id = id; | 171 | quirk->id = id; |
| 172 | quirk->np = np; | ||
| 168 | quirk->i2c_msg.addr = addr; | 173 | quirk->i2c_msg.addr = addr; |
| 169 | 174 | ||
| 170 | ret = of_irq_parse_one(np, 0, argsa); | 175 | ret = of_irq_parse_one(np, 0, argsa); |
diff --git a/arch/arm/mach-tegra/iomap.h b/arch/arm/mach-tegra/iomap.h index 9e5b2f869fc8..9bc291e76887 100644 --- a/arch/arm/mach-tegra/iomap.h +++ b/arch/arm/mach-tegra/iomap.h | |||
| @@ -79,15 +79,24 @@ | |||
| 79 | #define TEGRA_PMC_BASE 0x7000E400 | 79 | #define TEGRA_PMC_BASE 0x7000E400 |
| 80 | #define TEGRA_PMC_SIZE SZ_256 | 80 | #define TEGRA_PMC_SIZE SZ_256 |
| 81 | 81 | ||
| 82 | #define TEGRA_MC_BASE 0x7000F000 | ||
| 83 | #define TEGRA_MC_SIZE SZ_1K | ||
| 84 | |||
| 82 | #define TEGRA_EMC_BASE 0x7000F400 | 85 | #define TEGRA_EMC_BASE 0x7000F400 |
| 83 | #define TEGRA_EMC_SIZE SZ_1K | 86 | #define TEGRA_EMC_SIZE SZ_1K |
| 84 | 87 | ||
| 88 | #define TEGRA114_MC_BASE 0x70019000 | ||
| 89 | #define TEGRA114_MC_SIZE SZ_4K | ||
| 90 | |||
| 85 | #define TEGRA_EMC0_BASE 0x7001A000 | 91 | #define TEGRA_EMC0_BASE 0x7001A000 |
| 86 | #define TEGRA_EMC0_SIZE SZ_2K | 92 | #define TEGRA_EMC0_SIZE SZ_2K |
| 87 | 93 | ||
| 88 | #define TEGRA_EMC1_BASE 0x7001A800 | 94 | #define TEGRA_EMC1_BASE 0x7001A800 |
| 89 | #define TEGRA_EMC1_SIZE SZ_2K | 95 | #define TEGRA_EMC1_SIZE SZ_2K |
| 90 | 96 | ||
| 97 | #define TEGRA124_MC_BASE 0x70019000 | ||
| 98 | #define TEGRA124_MC_SIZE SZ_4K | ||
| 99 | |||
| 91 | #define TEGRA124_EMC_BASE 0x7001B000 | 100 | #define TEGRA124_EMC_BASE 0x7001B000 |
| 92 | #define TEGRA124_EMC_SIZE SZ_2K | 101 | #define TEGRA124_EMC_SIZE SZ_2K |
| 93 | 102 | ||
diff --git a/arch/arm/mach-tegra/sleep-tegra20.S b/arch/arm/mach-tegra/sleep-tegra20.S index 5c8e638ee51a..dedeebfccc55 100644 --- a/arch/arm/mach-tegra/sleep-tegra20.S +++ b/arch/arm/mach-tegra/sleep-tegra20.S | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | 32 | ||
| 33 | #define EMC_CFG 0xc | 33 | #define EMC_CFG 0xc |
| 34 | #define EMC_ADR_CFG 0x10 | 34 | #define EMC_ADR_CFG 0x10 |
| 35 | #define EMC_REFRESH 0x70 | ||
| 36 | #define EMC_NOP 0xdc | 35 | #define EMC_NOP 0xdc |
| 37 | #define EMC_SELF_REF 0xe0 | 36 | #define EMC_SELF_REF 0xe0 |
| 38 | #define EMC_REQ_CTRL 0x2b0 | 37 | #define EMC_REQ_CTRL 0x2b0 |
| @@ -397,7 +396,6 @@ padload_done: | |||
| 397 | mov r1, #1 | 396 | mov r1, #1 |
| 398 | str r1, [r0, #EMC_NOP] | 397 | str r1, [r0, #EMC_NOP] |
| 399 | str r1, [r0, #EMC_NOP] | 398 | str r1, [r0, #EMC_NOP] |
| 400 | str r1, [r0, #EMC_REFRESH] | ||
| 401 | 399 | ||
| 402 | emc_device_mask r1, r0 | 400 | emc_device_mask r1, r0 |
| 403 | 401 | ||
diff --git a/arch/arm/mach-tegra/sleep-tegra30.S b/arch/arm/mach-tegra/sleep-tegra30.S index dd4a67dabd91..d0b4c486ddbf 100644 --- a/arch/arm/mach-tegra/sleep-tegra30.S +++ b/arch/arm/mach-tegra/sleep-tegra30.S | |||
| @@ -29,7 +29,6 @@ | |||
| 29 | #define EMC_CFG 0xc | 29 | #define EMC_CFG 0xc |
| 30 | #define EMC_ADR_CFG 0x10 | 30 | #define EMC_ADR_CFG 0x10 |
| 31 | #define EMC_TIMING_CONTROL 0x28 | 31 | #define EMC_TIMING_CONTROL 0x28 |
| 32 | #define EMC_REFRESH 0x70 | ||
| 33 | #define EMC_NOP 0xdc | 32 | #define EMC_NOP 0xdc |
| 34 | #define EMC_SELF_REF 0xe0 | 33 | #define EMC_SELF_REF 0xe0 |
| 35 | #define EMC_MRW 0xe8 | 34 | #define EMC_MRW 0xe8 |
| @@ -45,6 +44,8 @@ | |||
| 45 | #define EMC_XM2VTTGENPADCTRL 0x310 | 44 | #define EMC_XM2VTTGENPADCTRL 0x310 |
| 46 | #define EMC_XM2VTTGENPADCTRL2 0x314 | 45 | #define EMC_XM2VTTGENPADCTRL2 0x314 |
| 47 | 46 | ||
| 47 | #define MC_EMEM_ARB_CFG 0x90 | ||
| 48 | |||
| 48 | #define PMC_CTRL 0x0 | 49 | #define PMC_CTRL 0x0 |
| 49 | #define PMC_CTRL_SIDE_EFFECT_LP0 (1 << 14) /* enter LP0 when CPU pwr gated */ | 50 | #define PMC_CTRL_SIDE_EFFECT_LP0 (1 << 14) /* enter LP0 when CPU pwr gated */ |
| 50 | 51 | ||
| @@ -419,6 +420,22 @@ _pll_m_c_x_done: | |||
| 419 | movweq r0, #:lower16:TEGRA124_EMC_BASE | 420 | movweq r0, #:lower16:TEGRA124_EMC_BASE |
| 420 | movteq r0, #:upper16:TEGRA124_EMC_BASE | 421 | movteq r0, #:upper16:TEGRA124_EMC_BASE |
| 421 | 422 | ||
| 423 | cmp r10, #TEGRA30 | ||
| 424 | moveq r2, #0x20 | ||
| 425 | movweq r4, #:lower16:TEGRA_MC_BASE | ||
| 426 | movteq r4, #:upper16:TEGRA_MC_BASE | ||
| 427 | cmp r10, #TEGRA114 | ||
| 428 | moveq r2, #0x34 | ||
| 429 | movweq r4, #:lower16:TEGRA114_MC_BASE | ||
| 430 | movteq r4, #:upper16:TEGRA114_MC_BASE | ||
| 431 | cmp r10, #TEGRA124 | ||
| 432 | moveq r2, #0x20 | ||
| 433 | movweq r4, #:lower16:TEGRA124_MC_BASE | ||
| 434 | movteq r4, #:upper16:TEGRA124_MC_BASE | ||
| 435 | |||
| 436 | ldr r1, [r5, r2] @ restore MC_EMEM_ARB_CFG | ||
| 437 | str r1, [r4, #MC_EMEM_ARB_CFG] | ||
| 438 | |||
| 422 | exit_self_refresh: | 439 | exit_self_refresh: |
| 423 | ldr r1, [r5, #0xC] @ restore EMC_XM2VTTGENPADCTRL | 440 | ldr r1, [r5, #0xC] @ restore EMC_XM2VTTGENPADCTRL |
| 424 | str r1, [r0, #EMC_XM2VTTGENPADCTRL] | 441 | str r1, [r0, #EMC_XM2VTTGENPADCTRL] |
| @@ -459,7 +476,6 @@ emc_wait_auto_cal_onetime: | |||
| 459 | cmp r10, #TEGRA30 | 476 | cmp r10, #TEGRA30 |
| 460 | streq r1, [r0, #EMC_NOP] | 477 | streq r1, [r0, #EMC_NOP] |
| 461 | streq r1, [r0, #EMC_NOP] | 478 | streq r1, [r0, #EMC_NOP] |
| 462 | streq r1, [r0, #EMC_REFRESH] | ||
| 463 | 479 | ||
| 464 | emc_device_mask r1, r0 | 480 | emc_device_mask r1, r0 |
| 465 | 481 | ||
| @@ -521,6 +537,8 @@ zcal_done: | |||
| 521 | ldr r1, [r5, #0x0] @ restore EMC_CFG | 537 | ldr r1, [r5, #0x0] @ restore EMC_CFG |
| 522 | str r1, [r0, #EMC_CFG] | 538 | str r1, [r0, #EMC_CFG] |
| 523 | 539 | ||
| 540 | emc_timing_update r1, r0 | ||
| 541 | |||
| 524 | /* Tegra114 had dual EMC channel, now config the other one */ | 542 | /* Tegra114 had dual EMC channel, now config the other one */ |
| 525 | cmp r10, #TEGRA114 | 543 | cmp r10, #TEGRA114 |
| 526 | bne __no_dual_emc_chanl | 544 | bne __no_dual_emc_chanl |
| @@ -546,6 +564,7 @@ tegra30_sdram_pad_address: | |||
| 546 | .word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14 | 564 | .word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14 |
| 547 | .word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18 | 565 | .word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18 |
| 548 | .word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c | 566 | .word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c |
| 567 | .word TEGRA_MC_BASE + MC_EMEM_ARB_CFG @0x20 | ||
| 549 | tegra30_sdram_pad_address_end: | 568 | tegra30_sdram_pad_address_end: |
| 550 | 569 | ||
| 551 | tegra114_sdram_pad_address: | 570 | tegra114_sdram_pad_address: |
| @@ -562,6 +581,7 @@ tegra114_sdram_pad_address: | |||
| 562 | .word TEGRA_EMC1_BASE + EMC_AUTO_CAL_INTERVAL @0x28 | 581 | .word TEGRA_EMC1_BASE + EMC_AUTO_CAL_INTERVAL @0x28 |
| 563 | .word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL @0x2c | 582 | .word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL @0x2c |
| 564 | .word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL2 @0x30 | 583 | .word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL2 @0x30 |
| 584 | .word TEGRA114_MC_BASE + MC_EMEM_ARB_CFG @0x34 | ||
| 565 | tegra114_sdram_pad_adress_end: | 585 | tegra114_sdram_pad_adress_end: |
| 566 | 586 | ||
| 567 | tegra124_sdram_pad_address: | 587 | tegra124_sdram_pad_address: |
| @@ -573,6 +593,7 @@ tegra124_sdram_pad_address: | |||
| 573 | .word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14 | 593 | .word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14 |
| 574 | .word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18 | 594 | .word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18 |
| 575 | .word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c | 595 | .word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c |
| 596 | .word TEGRA124_MC_BASE + MC_EMEM_ARB_CFG @0x20 | ||
| 576 | tegra124_sdram_pad_address_end: | 597 | tegra124_sdram_pad_address_end: |
| 577 | 598 | ||
| 578 | tegra30_sdram_pad_size: | 599 | tegra30_sdram_pad_size: |
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 251ecf34cb02..a231815f549b 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms | |||
| @@ -112,12 +112,13 @@ config ARCH_MESON | |||
| 112 | bool "Amlogic Platforms" | 112 | bool "Amlogic Platforms" |
| 113 | select PINCTRL | 113 | select PINCTRL |
| 114 | select PINCTRL_MESON | 114 | select PINCTRL_MESON |
| 115 | select COMMON_CLK_AMLOGIC | ||
| 116 | select COMMON_CLK_GXBB | 115 | select COMMON_CLK_GXBB |
| 117 | select COMMON_CLK_AXG | 116 | select COMMON_CLK_AXG |
| 117 | select COMMON_CLK_G12A | ||
| 118 | select MESON_IRQ_GPIO | 118 | select MESON_IRQ_GPIO |
| 119 | help | 119 | help |
| 120 | This enables support for the Amlogic S905 SoCs. | 120 | This enables support for the arm64 based Amlogic SoCs |
| 121 | such as the s905, S905X/D, S912, A113X/D or S905X/D2 | ||
| 121 | 122 | ||
| 122 | config ARCH_MVEBU | 123 | config ARCH_MVEBU |
| 123 | bool "Marvell EBU SoC Family" | 124 | bool "Marvell EBU SoC Family" |
| @@ -146,6 +147,10 @@ config ARCH_MXC | |||
| 146 | bool "ARMv8 based NXP i.MX SoC family" | 147 | bool "ARMv8 based NXP i.MX SoC family" |
| 147 | select ARM64_ERRATUM_843419 | 148 | select ARM64_ERRATUM_843419 |
| 148 | select ARM64_ERRATUM_845719 | 149 | select ARM64_ERRATUM_845719 |
| 150 | select IMX_GPCV2 | ||
| 151 | select IMX_GPCV2_PM_DOMAINS | ||
| 152 | select PM | ||
| 153 | select PM_GENERIC_DOMAINS | ||
| 149 | help | 154 | help |
| 150 | This enables support for the ARMv8 based SoCs in the | 155 | This enables support for the ARMv8 based SoCs in the |
| 151 | NXP i.MX family. | 156 | NXP i.MX family. |
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index a55cbba40a5a..ca8a94f15ac0 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <linux/clk.h> | 11 | #include <linux/clk.h> |
| 12 | #include <linux/gpio/consumer.h> | ||
| 12 | #include <linux/io.h> | 13 | #include <linux/io.h> |
| 13 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
| 14 | #include <linux/jiffies.h> | 15 | #include <linux/jiffies.h> |
| @@ -40,6 +41,8 @@ struct da8xx_ohci_hcd { | |||
| 40 | struct regulator *vbus_reg; | 41 | struct regulator *vbus_reg; |
| 41 | struct notifier_block nb; | 42 | struct notifier_block nb; |
| 42 | unsigned int reg_enabled; | 43 | unsigned int reg_enabled; |
| 44 | struct gpio_desc *vbus_gpio; | ||
| 45 | struct gpio_desc *oc_gpio; | ||
| 43 | }; | 46 | }; |
| 44 | 47 | ||
| 45 | #define to_da8xx_ohci(hcd) (struct da8xx_ohci_hcd *)(hcd_to_ohci(hcd)->priv) | 48 | #define to_da8xx_ohci(hcd) (struct da8xx_ohci_hcd *)(hcd_to_ohci(hcd)->priv) |
| @@ -86,12 +89,13 @@ static void ohci_da8xx_disable(struct usb_hcd *hcd) | |||
| 86 | static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on) | 89 | static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on) |
| 87 | { | 90 | { |
| 88 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); | 91 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); |
| 89 | struct device *dev = hcd->self.controller; | 92 | struct device *dev = hcd->self.controller; |
| 90 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); | ||
| 91 | int ret; | 93 | int ret; |
| 92 | 94 | ||
| 93 | if (hub && hub->set_power) | 95 | if (da8xx_ohci->vbus_gpio) { |
| 94 | return hub->set_power(1, on); | 96 | gpiod_set_value_cansleep(da8xx_ohci->vbus_gpio, on); |
| 97 | return 0; | ||
| 98 | } | ||
| 95 | 99 | ||
| 96 | if (!da8xx_ohci->vbus_reg) | 100 | if (!da8xx_ohci->vbus_reg) |
| 97 | return 0; | 101 | return 0; |
| @@ -119,11 +123,9 @@ static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on) | |||
| 119 | static int ohci_da8xx_get_power(struct usb_hcd *hcd) | 123 | static int ohci_da8xx_get_power(struct usb_hcd *hcd) |
| 120 | { | 124 | { |
| 121 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); | 125 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); |
| 122 | struct device *dev = hcd->self.controller; | ||
| 123 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); | ||
| 124 | 126 | ||
| 125 | if (hub && hub->get_power) | 127 | if (da8xx_ohci->vbus_gpio) |
| 126 | return hub->get_power(1); | 128 | return gpiod_get_value_cansleep(da8xx_ohci->vbus_gpio); |
| 127 | 129 | ||
| 128 | if (da8xx_ohci->vbus_reg) | 130 | if (da8xx_ohci->vbus_reg) |
| 129 | return regulator_is_enabled(da8xx_ohci->vbus_reg); | 131 | return regulator_is_enabled(da8xx_ohci->vbus_reg); |
| @@ -134,13 +136,11 @@ static int ohci_da8xx_get_power(struct usb_hcd *hcd) | |||
| 134 | static int ohci_da8xx_get_oci(struct usb_hcd *hcd) | 136 | static int ohci_da8xx_get_oci(struct usb_hcd *hcd) |
| 135 | { | 137 | { |
| 136 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); | 138 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); |
| 137 | struct device *dev = hcd->self.controller; | ||
| 138 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); | ||
| 139 | unsigned int flags; | 139 | unsigned int flags; |
| 140 | int ret; | 140 | int ret; |
| 141 | 141 | ||
| 142 | if (hub && hub->get_oci) | 142 | if (da8xx_ohci->oc_gpio) |
| 143 | return hub->get_oci(1); | 143 | return gpiod_get_value_cansleep(da8xx_ohci->oc_gpio); |
| 144 | 144 | ||
| 145 | if (!da8xx_ohci->vbus_reg) | 145 | if (!da8xx_ohci->vbus_reg) |
| 146 | return 0; | 146 | return 0; |
| @@ -158,10 +158,8 @@ static int ohci_da8xx_get_oci(struct usb_hcd *hcd) | |||
| 158 | static int ohci_da8xx_has_set_power(struct usb_hcd *hcd) | 158 | static int ohci_da8xx_has_set_power(struct usb_hcd *hcd) |
| 159 | { | 159 | { |
| 160 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); | 160 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); |
| 161 | struct device *dev = hcd->self.controller; | ||
| 162 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); | ||
| 163 | 161 | ||
| 164 | if (hub && hub->set_power) | 162 | if (da8xx_ohci->vbus_gpio) |
| 165 | return 1; | 163 | return 1; |
| 166 | 164 | ||
| 167 | if (da8xx_ohci->vbus_reg) | 165 | if (da8xx_ohci->vbus_reg) |
| @@ -173,10 +171,8 @@ static int ohci_da8xx_has_set_power(struct usb_hcd *hcd) | |||
| 173 | static int ohci_da8xx_has_oci(struct usb_hcd *hcd) | 171 | static int ohci_da8xx_has_oci(struct usb_hcd *hcd) |
| 174 | { | 172 | { |
| 175 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); | 173 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); |
| 176 | struct device *dev = hcd->self.controller; | ||
| 177 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); | ||
| 178 | 174 | ||
| 179 | if (hub && hub->get_oci) | 175 | if (da8xx_ohci->oc_gpio) |
| 180 | return 1; | 176 | return 1; |
| 181 | 177 | ||
| 182 | if (da8xx_ohci->vbus_reg) | 178 | if (da8xx_ohci->vbus_reg) |
| @@ -196,19 +192,6 @@ static int ohci_da8xx_has_potpgt(struct usb_hcd *hcd) | |||
| 196 | return 0; | 192 | return 0; |
| 197 | } | 193 | } |
| 198 | 194 | ||
| 199 | /* | ||
| 200 | * Handle the port over-current indicator change. | ||
| 201 | */ | ||
| 202 | static void ohci_da8xx_ocic_handler(struct da8xx_ohci_root_hub *hub, | ||
| 203 | unsigned port) | ||
| 204 | { | ||
| 205 | ocic_mask |= 1 << port; | ||
| 206 | |||
| 207 | /* Once over-current is detected, the port needs to be powered down */ | ||
| 208 | if (hub->get_oci(port) > 0) | ||
| 209 | hub->set_power(port, 0); | ||
| 210 | } | ||
| 211 | |||
| 212 | static int ohci_da8xx_regulator_event(struct notifier_block *nb, | 195 | static int ohci_da8xx_regulator_event(struct notifier_block *nb, |
| 213 | unsigned long event, void *data) | 196 | unsigned long event, void *data) |
| 214 | { | 197 | { |
| @@ -223,16 +206,23 @@ static int ohci_da8xx_regulator_event(struct notifier_block *nb, | |||
| 223 | return 0; | 206 | return 0; |
| 224 | } | 207 | } |
| 225 | 208 | ||
| 209 | static irqreturn_t ohci_da8xx_oc_handler(int irq, void *data) | ||
| 210 | { | ||
| 211 | struct da8xx_ohci_hcd *da8xx_ohci = data; | ||
| 212 | |||
| 213 | if (gpiod_get_value(da8xx_ohci->oc_gpio)) | ||
| 214 | gpiod_set_value(da8xx_ohci->vbus_gpio, 0); | ||
| 215 | |||
| 216 | return IRQ_HANDLED; | ||
| 217 | } | ||
| 218 | |||
| 226 | static int ohci_da8xx_register_notify(struct usb_hcd *hcd) | 219 | static int ohci_da8xx_register_notify(struct usb_hcd *hcd) |
| 227 | { | 220 | { |
| 228 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); | 221 | struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); |
| 229 | struct device *dev = hcd->self.controller; | 222 | struct device *dev = hcd->self.controller; |
| 230 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); | ||
| 231 | int ret = 0; | 223 | int ret = 0; |
| 232 | 224 | ||
| 233 | if (hub && hub->ocic_notify) { | 225 | if (!da8xx_ohci->oc_gpio && da8xx_ohci->vbus_reg) { |
| 234 | ret = hub->ocic_notify(ohci_da8xx_ocic_handler); | ||
| 235 | } else if (da8xx_ohci->vbus_reg) { | ||
| 236 | da8xx_ohci->nb.notifier_call = ohci_da8xx_regulator_event; | 226 | da8xx_ohci->nb.notifier_call = ohci_da8xx_regulator_event; |
| 237 | ret = devm_regulator_register_notifier(da8xx_ohci->vbus_reg, | 227 | ret = devm_regulator_register_notifier(da8xx_ohci->vbus_reg, |
| 238 | &da8xx_ohci->nb); | 228 | &da8xx_ohci->nb); |
| @@ -244,15 +234,6 @@ static int ohci_da8xx_register_notify(struct usb_hcd *hcd) | |||
| 244 | return ret; | 234 | return ret; |
| 245 | } | 235 | } |
| 246 | 236 | ||
| 247 | static void ohci_da8xx_unregister_notify(struct usb_hcd *hcd) | ||
| 248 | { | ||
| 249 | struct device *dev = hcd->self.controller; | ||
| 250 | struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); | ||
| 251 | |||
| 252 | if (hub && hub->ocic_notify) | ||
| 253 | hub->ocic_notify(NULL); | ||
| 254 | } | ||
| 255 | |||
| 256 | static int ohci_da8xx_reset(struct usb_hcd *hcd) | 237 | static int ohci_da8xx_reset(struct usb_hcd *hcd) |
| 257 | { | 238 | { |
| 258 | struct device *dev = hcd->self.controller; | 239 | struct device *dev = hcd->self.controller; |
| @@ -402,34 +383,35 @@ MODULE_DEVICE_TABLE(of, da8xx_ohci_ids); | |||
| 402 | static int ohci_da8xx_probe(struct platform_device *pdev) | 383 | static int ohci_da8xx_probe(struct platform_device *pdev) |
| 403 | { | 384 | { |
| 404 | struct da8xx_ohci_hcd *da8xx_ohci; | 385 | struct da8xx_ohci_hcd *da8xx_ohci; |
| 386 | struct device *dev = &pdev->dev; | ||
| 387 | int error, hcd_irq, oc_irq; | ||
| 405 | struct usb_hcd *hcd; | 388 | struct usb_hcd *hcd; |
| 406 | struct resource *mem; | 389 | struct resource *mem; |
| 407 | int error, irq; | 390 | |
| 408 | hcd = usb_create_hcd(&ohci_da8xx_hc_driver, &pdev->dev, | 391 | hcd = usb_create_hcd(&ohci_da8xx_hc_driver, dev, dev_name(dev)); |
| 409 | dev_name(&pdev->dev)); | ||
| 410 | if (!hcd) | 392 | if (!hcd) |
| 411 | return -ENOMEM; | 393 | return -ENOMEM; |
| 412 | 394 | ||
| 413 | da8xx_ohci = to_da8xx_ohci(hcd); | 395 | da8xx_ohci = to_da8xx_ohci(hcd); |
| 414 | da8xx_ohci->hcd = hcd; | 396 | da8xx_ohci->hcd = hcd; |
| 415 | 397 | ||
| 416 | da8xx_ohci->usb11_clk = devm_clk_get(&pdev->dev, NULL); | 398 | da8xx_ohci->usb11_clk = devm_clk_get(dev, NULL); |
| 417 | if (IS_ERR(da8xx_ohci->usb11_clk)) { | 399 | if (IS_ERR(da8xx_ohci->usb11_clk)) { |
| 418 | error = PTR_ERR(da8xx_ohci->usb11_clk); | 400 | error = PTR_ERR(da8xx_ohci->usb11_clk); |
| 419 | if (error != -EPROBE_DEFER) | 401 | if (error != -EPROBE_DEFER) |
| 420 | dev_err(&pdev->dev, "Failed to get clock.\n"); | 402 | dev_err(dev, "Failed to get clock.\n"); |
| 421 | goto err; | 403 | goto err; |
| 422 | } | 404 | } |
| 423 | 405 | ||
| 424 | da8xx_ohci->usb11_phy = devm_phy_get(&pdev->dev, "usb-phy"); | 406 | da8xx_ohci->usb11_phy = devm_phy_get(dev, "usb-phy"); |
| 425 | if (IS_ERR(da8xx_ohci->usb11_phy)) { | 407 | if (IS_ERR(da8xx_ohci->usb11_phy)) { |
| 426 | error = PTR_ERR(da8xx_ohci->usb11_phy); | 408 | error = PTR_ERR(da8xx_ohci->usb11_phy); |
| 427 | if (error != -EPROBE_DEFER) | 409 | if (error != -EPROBE_DEFER) |
| 428 | dev_err(&pdev->dev, "Failed to get phy.\n"); | 410 | dev_err(dev, "Failed to get phy.\n"); |
| 429 | goto err; | 411 | goto err; |
| 430 | } | 412 | } |
| 431 | 413 | ||
| 432 | da8xx_ohci->vbus_reg = devm_regulator_get_optional(&pdev->dev, "vbus"); | 414 | da8xx_ohci->vbus_reg = devm_regulator_get_optional(dev, "vbus"); |
| 433 | if (IS_ERR(da8xx_ohci->vbus_reg)) { | 415 | if (IS_ERR(da8xx_ohci->vbus_reg)) { |
| 434 | error = PTR_ERR(da8xx_ohci->vbus_reg); | 416 | error = PTR_ERR(da8xx_ohci->vbus_reg); |
| 435 | if (error == -ENODEV) { | 417 | if (error == -ENODEV) { |
| @@ -437,13 +419,34 @@ static int ohci_da8xx_probe(struct platform_device *pdev) | |||
| 437 | } else if (error == -EPROBE_DEFER) { | 419 | } else if (error == -EPROBE_DEFER) { |
| 438 | goto err; | 420 | goto err; |
| 439 | } else { | 421 | } else { |
| 440 | dev_err(&pdev->dev, "Failed to get regulator\n"); | 422 | dev_err(dev, "Failed to get regulator\n"); |
| 441 | goto err; | 423 | goto err; |
| 442 | } | 424 | } |
| 443 | } | 425 | } |
| 444 | 426 | ||
| 427 | da8xx_ohci->vbus_gpio = devm_gpiod_get_optional(dev, "vbus", | ||
| 428 | GPIOD_OUT_HIGH); | ||
| 429 | if (IS_ERR(da8xx_ohci->vbus_gpio)) | ||
| 430 | goto err; | ||
| 431 | |||
| 432 | da8xx_ohci->oc_gpio = devm_gpiod_get_optional(dev, "oc", GPIOD_IN); | ||
| 433 | if (IS_ERR(da8xx_ohci->oc_gpio)) | ||
| 434 | goto err; | ||
| 435 | |||
| 436 | if (da8xx_ohci->oc_gpio) { | ||
| 437 | oc_irq = gpiod_to_irq(da8xx_ohci->oc_gpio); | ||
| 438 | if (oc_irq < 0) | ||
| 439 | goto err; | ||
| 440 | |||
| 441 | error = devm_request_irq(dev, oc_irq, ohci_da8xx_oc_handler, | ||
| 442 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
| 443 | "OHCI over-current indicator", da8xx_ohci); | ||
| 444 | if (error) | ||
| 445 | goto err; | ||
| 446 | } | ||
| 447 | |||
| 445 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 448 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 446 | hcd->regs = devm_ioremap_resource(&pdev->dev, mem); | 449 | hcd->regs = devm_ioremap_resource(dev, mem); |
| 447 | if (IS_ERR(hcd->regs)) { | 450 | if (IS_ERR(hcd->regs)) { |
| 448 | error = PTR_ERR(hcd->regs); | 451 | error = PTR_ERR(hcd->regs); |
| 449 | goto err; | 452 | goto err; |
| @@ -451,13 +454,13 @@ static int ohci_da8xx_probe(struct platform_device *pdev) | |||
| 451 | hcd->rsrc_start = mem->start; | 454 | hcd->rsrc_start = mem->start; |
| 452 | hcd->rsrc_len = resource_size(mem); | 455 | hcd->rsrc_len = resource_size(mem); |
| 453 | 456 | ||
| 454 | irq = platform_get_irq(pdev, 0); | 457 | hcd_irq = platform_get_irq(pdev, 0); |
| 455 | if (irq < 0) { | 458 | if (hcd_irq < 0) { |
| 456 | error = -ENODEV; | 459 | error = -ENODEV; |
| 457 | goto err; | 460 | goto err; |
| 458 | } | 461 | } |
| 459 | 462 | ||
| 460 | error = usb_add_hcd(hcd, irq, 0); | 463 | error = usb_add_hcd(hcd, hcd_irq, 0); |
| 461 | if (error) | 464 | if (error) |
| 462 | goto err; | 465 | goto err; |
| 463 | 466 | ||
| @@ -480,7 +483,6 @@ static int ohci_da8xx_remove(struct platform_device *pdev) | |||
| 480 | { | 483 | { |
| 481 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | 484 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
| 482 | 485 | ||
| 483 | ohci_da8xx_unregister_notify(hcd); | ||
| 484 | usb_remove_hcd(hcd); | 486 | usb_remove_hcd(hcd); |
| 485 | usb_put_hcd(hcd); | 487 | usb_put_hcd(hcd); |
| 486 | 488 | ||
diff --git a/include/dt-bindings/power/mt8173-power.h b/include/dt-bindings/power/mt8173-power.h index 15d531aa6e78..ef4a7f944848 100644 --- a/include/dt-bindings/power/mt8173-power.h +++ b/include/dt-bindings/power/mt8173-power.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _DT_BINDINGS_POWER_MT8183_POWER_H | 2 | #ifndef _DT_BINDINGS_POWER_MT8173_POWER_H |
| 3 | #define _DT_BINDINGS_POWER_MT8183_POWER_H | 3 | #define _DT_BINDINGS_POWER_MT8173_POWER_H |
| 4 | 4 | ||
| 5 | #define MT8173_POWER_DOMAIN_VDEC 0 | 5 | #define MT8173_POWER_DOMAIN_VDEC 0 |
| 6 | #define MT8173_POWER_DOMAIN_VENC 1 | 6 | #define MT8173_POWER_DOMAIN_VENC 1 |
| @@ -13,4 +13,4 @@ | |||
| 13 | #define MT8173_POWER_DOMAIN_MFG_2D 8 | 13 | #define MT8173_POWER_DOMAIN_MFG_2D 8 |
| 14 | #define MT8173_POWER_DOMAIN_MFG 9 | 14 | #define MT8173_POWER_DOMAIN_MFG 9 |
| 15 | 15 | ||
| 16 | #endif /* _DT_BINDINGS_POWER_MT8183_POWER_H */ | 16 | #endif /* _DT_BINDINGS_POWER_MT8173_POWER_H */ |
diff --git a/include/linux/davinci_emac.h b/include/linux/davinci_emac.h index 05b97144d342..28e6cf1356da 100644 --- a/include/linux/davinci_emac.h +++ b/include/linux/davinci_emac.h | |||
| @@ -46,5 +46,4 @@ enum { | |||
| 46 | EMAC_VERSION_2, /* DM646x */ | 46 | EMAC_VERSION_2, /* DM646x */ |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context); | ||
| 50 | #endif | 49 | #endif |
diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb-davinci.h index 0926e99f2e8f..879f5c78b91a 100644 --- a/include/linux/platform_data/usb-davinci.h +++ b/include/linux/platform_data/usb-davinci.h | |||
| @@ -11,22 +11,8 @@ | |||
| 11 | #ifndef __ASM_ARCH_USB_H | 11 | #ifndef __ASM_ARCH_USB_H |
| 12 | #define __ASM_ARCH_USB_H | 12 | #define __ASM_ARCH_USB_H |
| 13 | 13 | ||
| 14 | struct da8xx_ohci_root_hub; | ||
| 15 | |||
| 16 | typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub, | ||
| 17 | unsigned port); | ||
| 18 | |||
| 19 | /* Passed as the platform data to the OHCI driver */ | 14 | /* Passed as the platform data to the OHCI driver */ |
| 20 | struct da8xx_ohci_root_hub { | 15 | struct da8xx_ohci_root_hub { |
| 21 | /* Switch the port power on/off */ | ||
| 22 | int (*set_power)(unsigned port, int on); | ||
| 23 | /* Read the port power status */ | ||
| 24 | int (*get_power)(unsigned port); | ||
| 25 | /* Read the port over-current indicator */ | ||
| 26 | int (*get_oci)(unsigned port); | ||
| 27 | /* Over-current indicator change notification (pass NULL to disable) */ | ||
| 28 | int (*ocic_notify)(da8xx_ocic_handler_t handler); | ||
| 29 | |||
| 30 | /* Time from power on to power good (in 2 ms units) */ | 16 | /* Time from power on to power good (in 2 ms units) */ |
| 31 | u8 potpgt; | 17 | u8 potpgt; |
| 32 | }; | 18 | }; |
