Re: AM335x OMAP2 common clock external fixed-clock registration
On 04/17/2015 05:00 AM, Michael Welling wrote: On Fri, Apr 17, 2015 at 01:23:50AM +0200, Sebastian Hesselbarth wrote: On 17.04.2015 00:09, Michael Welling wrote: On Thu, Apr 16, 2015 at 10:37:19PM +0200, Sebastian Hesselbarth wrote: On 16.04.2015 18:17, Michael Welling wrote: On Thu, Apr 16, 2015 at 07:32:32AM +0300, Tero Kristo wrote: On 04/15/2015 11:51 PM, Michael Welling wrote: On Wed, Apr 15, 2015 at 01:45:53PM -0700, Mike Turquette wrote: On Wed, Apr 15, 2015 at 12:47 PM, Michael Welling mwell...@ieee.org wrote: [...] There is still an issue with the si5351. I had to comment out the clk_put here for the frequency to show up: http://lxr.free-electrons.com/source/drivers/clk/clk-si5351.c#L1133 Ideas? What is the most recent upstream commit that you are based on? I am working from 4.0.0-rc7. 7b43b47373d40d557cd7e1a84a0bd8ebc4d745ab Hmm, I wonder why si5351 calls clk_put immediately after of_clk_get in the first place, as far as I understand this destroys the clock handle, which is still being used later in the code. Not sure how this ever worked. This has been in the code since the initial commit. The reason it worked before may be related with recent rework of clk_put() itself and clk cookies instead of pointers. I lost track on the recent clk subsystem changes here, sorry. However, droping the clk immediately surely isn't right. The thing is, we can remove the clk_put() just because there is no _remove() for that driver. I remember that back in the days the driver was mainlined, clk removal wasn't too easy. FWIW, as soon as _remove() support will be added by someone, we'll have to rethink passing struct clk* by platform_data or at least double-check if we ever used [of_]clk_get() to obtain it. Mind to send a patch removing the clk_put() on !IS_ERR and add a proper error path instead? While of_clk_get() is the only calls that need cleanup on error in si5351_dt_parse() we should probably move that calls to the end of this function. Otherwise we'd also have to cleanup on every of_parse_foo() failure. What would be the proper error path? What cleanup is required? A proper error path would be to release any claimed resource on any error. If you look at the code, the only resources that need to be released are the two clocks in question. So for every error return in the probe function and in the of si5351_dt_parse it needs to clk_put first right? See attached patch to see if we are on the same page. It should be noted that there are more deep rooted issues with the driver that I have noticed. For one the driver behaves differently if the debugging is on and when it is off. I guess you mean #define DEBUG in the driver? Yes. Here is what the kernel reports with debugging off: Do you have any measurement equipment to check what is actually set? Yes, I have an oscilloscope here at my desk. The reported numbers do not always correspond to the actual output in some cases. The ms2 output has appeared to stop working all together sometime whilest testing. I may have to solder a new chip on there. Could misconfiguration damage the chip? root@som3517-som200:~# cat /sys/kernel/debug/clk/clk_summary clock enable_cnt prepare_cntrate accuracy phase ref27002700 0 0 xtal 002700 0 0 pllb 00 59994 0 0 ms0 001249 0 0 clk0 001249 0 0 plla 00 59994 0 0 ms2 00 8219178 0 0 clk2 00 8219178 0 0 ms1 0094117646 0 0 clk1 0094117646 0 0 Here is what the kernel reports with debugging on: clock enable_cnt prepare_cntrate accuracy phase ref27002700 0 0 xtal 002700 0 0 pllb 00 884736000 0 0 ms0 0018432000 0 0 clk0 0018432000 0 0 Is this what you expect for clk0? Yes. plla 00 897023997 0
Re: [RFC/PATCH v2 0/5] Add cpuidle support for r8a7791
Hi Kobayashi-san, from my point of view this looks reasonable. Is it marked as an RFC because you see some problems with it. If not perhaps it would be best to proceed to a more formal stage of the review process by dropping the RFC designation? On Thu, Apr 16, 2015 at 07:35:35PM +0900, Keita Kobayashi wrote: Hello These patches add cpuidle support for Renesas r8a7791 SoC. The r8a7791 cpuidle supports WFI and the cpu power state(Core-Standby) using Generic ARM CPU idle driver(cpuidle-arm). Generic ARM CPU idle driver have been merged in linux-pm.git / pm+acpi-4.1-rc1 tag. Based on : renesas.git / renesas-devel-20150413-v4.0 tag Tested on : koelsch board Changes from v1: - Change select to depend on - Document a new enable method of Renesas cpuidle Keita Kobayashi (5): ARM: cpuidle: Add cpuidle support for R-Car Gen2 series ARM: shmobile: Add cpuidle_ops for R-Car cpuidle devicetree: bindings: Add new cpuidle enable method for Renesas R-car SoCs ARM: shmobile: dtsi: Add cpuidle parameters into each cpu for r8a7791 ARM: shmobile: Enable Renesas R-Car cpuidle for shmobile_defconfig Documentation/devicetree/bindings/arm/cpus.txt | 1 + arch/arm/boot/dts/r8a7791.dtsi | 13 + arch/arm/configs/shmobile_defconfig| 3 +++ arch/arm/mach-shmobile/platsmp-apmu.c | 14 +++--- arch/arm/mach-shmobile/platsmp-apmu.h | 1 + arch/arm/mach-shmobile/pm-rcar-gen2.c | 17 + drivers/cpuidle/Kconfig.arm| 8 7 files changed, 54 insertions(+), 3 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[alsa-devel] [PATCH 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection
This patch add support for select accessory detect mode to HPDETL or HPDETR. Arizona provides a headphone detection circuit on the HPDETL and HPDETR pins to measure the impedance of an external load connected to the headphone. Depending on board design, headphone detect pins can change to HPDETR or HPDETL. Signed-off-by: Inha Song ideal.s...@samsung.com --- drivers/extcon/extcon-arizona.c | 34 ++ include/linux/mfd/arizona/pdata.h | 3 +++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 63f01c4..7bc9159 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -95,6 +95,7 @@ struct arizona_extcon_info { int jack_flips; int hpdet_ip; + int hpdet_channel; struct extcon_dev *edev; }; @@ -653,9 +654,9 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info) ret = regmap_update_bits(arizona-regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, ARIZONA_ACCDET_MODE_MASK, -ARIZONA_ACCDET_MODE_HPL); +info-hpdet_channel); if (ret != 0) { - dev_err(arizona-dev, Failed to set HPDETL mode: %d\n, ret); + dev_err(arizona-dev, Failed to set HPDET mode: %d\n, ret); goto err; } @@ -705,9 +706,9 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info) ARIZONA_ACCESSORY_DETECT_MODE_1, ARIZONA_ACCDET_SRC | ARIZONA_ACCDET_MODE_MASK, info-micd_modes[0].src | -ARIZONA_ACCDET_MODE_HPL); +info-hpdet_channel); if (ret != 0) { - dev_err(arizona-dev, Failed to set HPDETL mode: %d\n, ret); + dev_err(arizona-dev, Failed to set HPDET mode: %d\n, ret); goto err; } @@ -1103,6 +1104,23 @@ static void arizona_micd_set_level(struct arizona *arizona, int index, regmap_update_bits(arizona-regmap, reg, mask, level); } +#ifdef CONFIG_OF +static int arizona_of_get_extcon_pdata(struct arizona *arizona) +{ + struct arizona_pdata *pdata = arizona-pdata; + + of_property_read_u32(arizona-dev-of_node, wlf,hpdet-channel, +pdata-hpdet_channel); + + return 0; +} +#else +static inline int arizona_of_get_extcon_pdata(struct arizona *arizona) +{ + return 0; +} +#endif + static int arizona_extcon_probe(struct platform_device *pdev) { struct arizona *arizona = dev_get_drvdata(pdev-dev.parent); @@ -1120,6 +1138,9 @@ static int arizona_extcon_probe(struct platform_device *pdev) if (!info) return -ENOMEM; + if (!dev_get_platdata(arizona-dev)) + arizona_of_get_extcon_pdata(arizona); + info-micvdd = devm_regulator_get(pdev-dev, MICVDD); if (IS_ERR(info-micvdd)) { ret = PTR_ERR(info-micvdd); @@ -1338,6 +1359,11 @@ static int arizona_extcon_probe(struct platform_device *pdev) arizona_extcon_set_mode(info, 0); + if (arizona-pdata.hpdet_channel) + info-hpdet_channel = ARIZONA_ACCDET_MODE_HPR; + else + info-hpdet_channel = ARIZONA_ACCDET_MODE_HPL; + pm_runtime_enable(pdev-dev); pm_runtime_idle(pdev-dev); pm_runtime_get_sync(pdev-dev); diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 4578c72..feb5903 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h @@ -139,6 +139,9 @@ struct arizona_pdata { /** GPIO used for mic isolation with HPDET */ int hpdet_id_gpio; + /** Channel to use for headphone detection */ + int hpdet_channel; + /** Extra debounce timeout used during initial mic detection (ms) */ int micd_detect_debounce; -- 2.0.0.390.gcb682f8 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] crypto: add new driver for Marvell CESA
Hi Jason, On Mon, 13 Apr 2015 20:11:46 + Jason Cooper ja...@lakedaemon.net wrote: I'd appreciate if we'd look into it. I understand from on-list and off-list discussion that the rewrite was unavoidable. So I'm willing to concede that. Giving people time to migrate from old to new while still being able to update for other security fixes seems reasonable. Jason, what do you think of the approach above? I say keep it simple. We shouldn't use the DT changes to trigger one vice the other. We need to be able to build both, but only load one at a time. If that's anything other than simple to do, then we make it a Kconfig binary choice and move on. Actually I was planning to handle it with a Kconfig dependency rule (NEW_DRIVER depends on !OLD_DRIVER and OLD_DRIVER depends on !NEW_DRIVER). I don't know how to make it a runtime check without adding new compatible strings for the kirkwood, dove and orion platforms, and I'm sure sure this is a good idea. Do you have any ideas ? Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[alsa-devel] [PATCH 0/2] Add support for select accessory detect mode to HPDETL or HPDETR
This set of patches adds support for select accessory detect mode to HPDETL or HPDETR. Inha Song (2): extcon: arizona: Add support for select accessory detect mode when headphone detection mfd: arizona: Update DT binding to support hpdet channel Documentation/devicetree/bindings/mfd/arizona.txt | 4 +++ drivers/extcon/extcon-arizona.c | 34 --- include/linux/mfd/arizona/pdata.h | 3 ++ 3 files changed, 37 insertions(+), 4 deletions(-) -- 2.0.0.390.gcb682f8 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] crypto: add new driver for Marvell CESA
On Fri, 17 Apr 2015 10:33:56 +0200 Boris Brezillon boris.brezil...@free-electrons.com wrote: Hi Jason, On Mon, 13 Apr 2015 20:11:46 + Jason Cooper ja...@lakedaemon.net wrote: I'd appreciate if we'd look into it. I understand from on-list and off-list discussion that the rewrite was unavoidable. So I'm willing to concede that. Giving people time to migrate from old to new while still being able to update for other security fixes seems reasonable. Jason, what do you think of the approach above? I say keep it simple. We shouldn't use the DT changes to trigger one vice the other. We need to be able to build both, but only load one at a time. If that's anything other than simple to do, then we make it a Kconfig binary choice and move on. Actually I was planning to handle it with a Kconfig dependency rule (NEW_DRIVER depends on !OLD_DRIVER and OLD_DRIVER depends on !NEW_DRIVER). I don't know how to make it a runtime check without adding new compatible strings for the kirkwood, dove and orion platforms, and I'm sure sure this is a good idea. ^ not Do you have any ideas ? Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] dmaengine: xgene-dma: Fix sparse wannings and coccinelle warnings
On Friday 17 April 2015 01:01:13 Rameshwar Prasad Sahu wrote: v3 changes: * Minor changes in length setting in DMA descriptor v2 changes: * Code cleanup * Changed way of setting DMA descriptors for big-endian This patch fixes compilation sparse warnings like incorrect type in assignment (different base types), cast to restricted __le64, symbol '__UNIQUE_ID_author__COUNTER__' has multiple initializers etc and coccinelle warnings (No need to set .owner here. The core will do it.) This patch is based on slave-dma / for-linus branch. (commit: 9f2fd0dfa594d857fbdaeda523ff7a46f16567f5 [26/28] dmaengine: Add support for APM X-Gene SoC DMA engine driver) Reported-by: kbuild test robot fengguang...@intel.com Signed-off-by: Rameshwar Prasad Sahu rs...@apm.com Looks good now, Reviewed-by: Arnd Bergmann a...@arndb.de There is one small enhancement that you could still do and I'll shut up after that ;-) -static void *xgene_dma_lookup_ext8(u64 *desc, int idx) +static __le64 *xgene_dma_lookup_ext8(struct xgene_dma_desc_hw *desc, int idx) { - return (idx % 2) ? (desc + idx - 1) : (desc + idx + 1); + switch (idx) { + case 0: + return desc-m1; + case 1: + return desc-m0; + case 2: + return desc-m3; + case 3: + return desc-m2; + default: + pr_err(Invalid dma descriptor index\n); + } + + return NULL; } ... /* Set 1st to 5th source addresses */ for (i = 0; i src_cnt; i++) { len = *nbytes; - xgene_dma_set_src_buffer((i == 0) ? (desc1 + 8) : + xgene_dma_set_src_buffer((i == 0) ? desc1-m1 : xgene_dma_lookup_ext8(desc2, i - 1), len, src[i]); - XGENE_DMA_DESC_MULTI_SET(desc1, scf[i], i); + desc1-m2 |= cpu_to_le64((scf[i] ((i + 1) * 8))); } If you just unroll this loop, you get code that is smaller and easier to understand: /* Set 1st to 5th source addresses */ xgene_dma_set_src_buffer(desc1-m1, len, src[0]); xgene_dma_set_src_buffer(desc2-m0, len, src[1]); xgene_dma_set_src_buffer(desc2-m3, len, src[2]); xgene_dma_set_src_buffer(desc2-m2, len, src[3]); desc1-m2 |= cpu_to_le64(scf[0] | scf[1] 8 | scf[2] 16 | scf[3] 24); Arnd -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [alsa-devel] [PATCH 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection
On Fri, Apr 17, 2015 at 05:32:58PM +0900, Inha Song wrote: This patch add support for select accessory detect mode to HPDETL or HPDETR. Arizona provides a headphone detection circuit on the HPDETL and HPDETR pins to measure the impedance of an external load connected to the headphone. Depending on board design, headphone detect pins can change to HPDETR or HPDETL. Signed-off-by: Inha Song ideal.s...@samsung.com --- drivers/extcon/extcon-arizona.c | 34 ++ include/linux/mfd/arizona/pdata.h | 3 +++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 63f01c4..7bc9159 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -95,6 +95,7 @@ struct arizona_extcon_info { int jack_flips; int hpdet_ip; + int hpdet_channel; Don't really think this is necessary we can just use the pdata value where required doesn't add much copying it to extcon_info. struct extcon_dev *edev; }; @@ -653,9 +654,9 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info) ret = regmap_update_bits(arizona-regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, ARIZONA_ACCDET_MODE_MASK, - ARIZONA_ACCDET_MODE_HPL); + info-hpdet_channel); if (ret != 0) { - dev_err(arizona-dev, Failed to set HPDETL mode: %d\n, ret); + dev_err(arizona-dev, Failed to set HPDET mode: %d\n, ret); goto err; } @@ -705,9 +706,9 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info) ARIZONA_ACCESSORY_DETECT_MODE_1, ARIZONA_ACCDET_SRC | ARIZONA_ACCDET_MODE_MASK, info-micd_modes[0].src | - ARIZONA_ACCDET_MODE_HPL); + info-hpdet_channel); if (ret != 0) { - dev_err(arizona-dev, Failed to set HPDETL mode: %d\n, ret); + dev_err(arizona-dev, Failed to set HPDET mode: %d\n, ret); goto err; } @@ -1103,6 +1104,23 @@ static void arizona_micd_set_level(struct arizona *arizona, int index, regmap_update_bits(arizona-regmap, reg, mask, level); } +#ifdef CONFIG_OF +static int arizona_of_get_extcon_pdata(struct arizona *arizona) +{ + struct arizona_pdata *pdata = arizona-pdata; + + of_property_read_u32(arizona-dev-of_node, wlf,hpdet-channel, + pdata-hpdet_channel); + + return 0; +} +#else +static inline int arizona_of_get_extcon_pdata(struct arizona *arizona) +{ + return 0; +} +#endif + I believe it is preferred to leave this as not ifdef'ed... static int arizona_extcon_probe(struct platform_device *pdev) { struct arizona *arizona = dev_get_drvdata(pdev-dev.parent); @@ -1120,6 +1138,9 @@ static int arizona_extcon_probe(struct platform_device *pdev) if (!info) return -ENOMEM; + if (!dev_get_platdata(arizona-dev)) + arizona_of_get_extcon_pdata(arizona); And to wrap this in an if (IS_ENABLED(CONFIG_OF)). + info-micvdd = devm_regulator_get(pdev-dev, MICVDD); if (IS_ERR(info-micvdd)) { ret = PTR_ERR(info-micvdd); @@ -1338,6 +1359,11 @@ static int arizona_extcon_probe(struct platform_device *pdev) arizona_extcon_set_mode(info, 0); + if (arizona-pdata.hpdet_channel) + info-hpdet_channel = ARIZONA_ACCDET_MODE_HPR; + else + info-hpdet_channel = ARIZONA_ACCDET_MODE_HPL; + Just move the two defines in include/dt-bindings/mfd/arizona.h and have the pdata get set directly to one of the values. pm_runtime_enable(pdev-dev); pm_runtime_idle(pdev-dev); pm_runtime_get_sync(pdev-dev); diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 4578c72..feb5903 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h @@ -139,6 +139,9 @@ struct arizona_pdata { /** GPIO used for mic isolation with HPDET */ int hpdet_id_gpio; + /** Channel to use for headphone detection */ + int hpdet_channel; Lets use and unsigned here, we don't need it to be signed and it saves type issues with read_u32. + /** Extra debounce timeout used during initial mic detection (ms) */ int micd_detect_debounce; -- 2.0.0.390.gcb682f8 Thanks, Charles -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC PATCH 2/2] tee: add OP-TEE driver
Adds mostly stubbed OP-TEE driver which also can be compiled as a loadable module. Signed-off-by: Jens Wiklander jens.wiklan...@linaro.org --- drivers/tee/Kconfig| 10 +++ drivers/tee/Makefile | 1 + drivers/tee/optee/Kconfig | 7 ++ drivers/tee/optee/Makefile | 2 + drivers/tee/optee/core.c | 192 + 5 files changed, 212 insertions(+) create mode 100644 drivers/tee/optee/Kconfig create mode 100644 drivers/tee/optee/Makefile create mode 100644 drivers/tee/optee/core.c diff --git a/drivers/tee/Kconfig b/drivers/tee/Kconfig index 64a8cd7..b269276 100644 --- a/drivers/tee/Kconfig +++ b/drivers/tee/Kconfig @@ -6,3 +6,13 @@ config TEE help This implements a generic interface towards a Trusted Execution Environment (TEE). + +if TEE + +menu TEE drivers + +source drivers/tee/optee/Kconfig + +endmenu + +endif diff --git a/drivers/tee/Makefile b/drivers/tee/Makefile index 60d2dab..53f3c76 100644 --- a/drivers/tee/Makefile +++ b/drivers/tee/Makefile @@ -1,3 +1,4 @@ obj-y += tee.o obj-y += tee_shm.o obj-y += tee_shm_pool.o +obj-$(CONFIG_OPTEE) += optee/ diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig new file mode 100644 index 000..f43af5e --- /dev/null +++ b/drivers/tee/optee/Kconfig @@ -0,0 +1,7 @@ +# OP-TEE Trusted Execution Environment Configuration +config OPTEE + tristate OP-TEE + default n + select DMA_CMA + help + This implements the OP-TEE Trusted Execution Environment (TEE) driver. diff --git a/drivers/tee/optee/Makefile b/drivers/tee/optee/Makefile new file mode 100644 index 000..124d22c --- /dev/null +++ b/drivers/tee/optee/Makefile @@ -0,0 +1,2 @@ +obj-$(CONFIG_OPTEE) += optee.o +optee-objs += core.o diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c new file mode 100644 index 000..e0f0755 --- /dev/null +++ b/drivers/tee/optee/core.c @@ -0,0 +1,192 @@ +/* + * Copyright (c) 2015, Linaro Limited + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ +#include linux/types.h +#include linux/string.h +#include linux/errno.h +#include linux/module.h +#include linux/platform_device.h +#include linux/slab.h +#include linux/dma-contiguous.h +#include linux/cma.h +#include linux/tee/tee_drv.h + +#define DRIVER_NAME tee-optee +#define OPTEE_VERSION 1 + +struct optee { + struct tee_device *supp_teedev; + struct tee_device *teedev; + struct device *dev; + struct tee_shm_pool *pool; +}; + +struct optee_context_data { + int dummy; +}; + +static void optee_get_version(struct tee_context *ctx, + u32 *version, u8 *uuid) +{ + *version = OPTEE_VERSION; + memset(uuid, 0, TEE_UUID_SIZE); +} + +static int optee_open(struct tee_context *ctx) +{ + ctx-data = kzalloc(sizeof(struct optee_context_data), GFP_KERNEL); + if (!ctx-data) + return -ENOMEM; + return 0; +} + +static void optee_release(struct tee_context *ctx) +{ + kfree(ctx-data); + ctx-data = NULL; +} + +static int optee_cmd(struct tee_context *ctx, void __user *buf, size_t len) +{ + return -EINVAL; +} + +static int optee_shm_share(struct tee_shm *shm) +{ + /* No special action needed to share memory with OP-TEE */ + return 0; +} + +static void optee_shm_unshare(struct tee_shm *shm) +{ +} + +static struct tee_driver_ops optee_ops = { + .get_version = optee_get_version, + .open = optee_open, + .release = optee_release, + .cmd = optee_cmd, + .shm_share = optee_shm_share, + .shm_unshare = optee_shm_unshare, +}; + +static struct tee_desc optee_desc = { + .name = DRIVER_NAME -clnt, + .ops = optee_ops, + .owner = THIS_MODULE, +}; + +static int optee_supp_cmd(struct tee_context *teectx, void __user *buf, + size_t len) +{ + return -EINVAL; +} + +static struct tee_driver_ops optee_supp_ops = { + .get_version = optee_get_version, + .open = optee_open, + .release = optee_release, + .cmd = optee_supp_cmd, + .shm_share = optee_shm_share, + .shm_unshare = optee_shm_unshare, +}; + +static struct tee_desc optee_supp_desc = { + .name = DRIVER_NAME -supp, + .ops = optee_supp_ops, + .owner = THIS_MODULE, + .flags = TEE_DESC_PRIVILEGED, +}; + +static int optee_probe(struct platform_device *pdev) +{ + struct tee_shm_pool *pool; + struct optee *optee; + u_long vaddr; + phys_addr_t paddr; + size_t size; + int
[RFC PATCH 1/2] tee: generic TEE subsystem
Initial patch for generic TEE subsystem. This subsystem provides: * Registration/un-registration of TEE drivers. * Shared memory between normal world and secure world. * Ioctl interface for interaction with user space. A TEE (Trusted Execution Environment) driver is a driver that interfaces with a trusted OS running in some secure environment, for example, TrustZone on ARM cpus, or a separate secure co-processor etc. To avoid putting unnecessary restrictions on the TEE driver and the trusted OS the TEE_IOC_CMD passes an opaque buffer to the TEE driver to facilitate a communication channel between user space and the trusted OS. The TEE subsystem can serve a TEE driver for a Global Platform compliant TEE, but it's not limited to only Global Platform TEEs. This patch builds on other similar implementations trying to solve the same problem: * optee_linuxdriver by among others Jean-michel DELORMEjean-michel.delo...@st.com and Emmanuel MICHEL emmanuel.mic...@st.com * Generic TrustZone Driver by Javier González jav...@javigon.com Signed-off-by: Jens Wiklander jens.wiklan...@linaro.org --- Documentation/ioctl/ioctl-number.txt | 1 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/tee/Kconfig | 8 + drivers/tee/Makefile | 3 + drivers/tee/tee.c| 253 +++ drivers/tee/tee_private.h| 64 +++ drivers/tee/tee_shm.c| 330 +++ drivers/tee/tee_shm_pool.c | 246 ++ include/linux/tee/tee.h | 180 +++ include/linux/tee/tee_drv.h | 271 11 files changed, 1359 insertions(+) create mode 100644 drivers/tee/Kconfig create mode 100644 drivers/tee/Makefile create mode 100644 drivers/tee/tee.c create mode 100644 drivers/tee/tee_private.h create mode 100644 drivers/tee/tee_shm.c create mode 100644 drivers/tee/tee_shm_pool.c create mode 100644 include/linux/tee/tee.h create mode 100644 include/linux/tee/tee_drv.h diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 8136e1f..6e9bd04 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt @@ -301,6 +301,7 @@ Code Seq#(hex) Include FileComments 0xA3 80-8F Port ACLin development: mailto:tle...@mindspring.com 0xA3 90-9F linux/dtlk.h +0xA4 00-1F linux/sec-hw/tee.h Generic TEE subsystem 0xAB 00-1F linux/nbd.h 0xAC 00-1F linux/raw.h 0xAD 00 Netfilter devicein development: diff --git a/drivers/Kconfig b/drivers/Kconfig index c0cc96b..7510f69 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -182,4 +182,6 @@ source drivers/thunderbolt/Kconfig source drivers/android/Kconfig +source drivers/tee/Kconfig + endmenu diff --git a/drivers/Makefile b/drivers/Makefile index 527a6da..0d24e70 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -165,3 +165,4 @@ obj-$(CONFIG_RAS) += ras/ obj-$(CONFIG_THUNDERBOLT) += thunderbolt/ obj-$(CONFIG_CORESIGHT)+= coresight/ obj-$(CONFIG_ANDROID) += android/ +obj-$(CONFIG_TEE) += tee/ diff --git a/drivers/tee/Kconfig b/drivers/tee/Kconfig new file mode 100644 index 000..64a8cd7 --- /dev/null +++ b/drivers/tee/Kconfig @@ -0,0 +1,8 @@ +# Generic Trusted Execution Environment Configuration +config TEE + bool Trusted Execution Environment support + default n + select DMA_SHARED_BUFFER + help + This implements a generic interface towards a Trusted Execution + Environment (TEE). diff --git a/drivers/tee/Makefile b/drivers/tee/Makefile new file mode 100644 index 000..60d2dab --- /dev/null +++ b/drivers/tee/Makefile @@ -0,0 +1,3 @@ +obj-y += tee.o +obj-y += tee_shm.o +obj-y += tee_shm_pool.o diff --git a/drivers/tee/tee.c b/drivers/tee/tee.c new file mode 100644 index 000..23a6e75 --- /dev/null +++ b/drivers/tee/tee.c @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2015, Linaro Limited + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ +#include linux/device.h +#include linux/fs.h +#include linux/module.h +#include linux/slab.h +#include linux/uaccess.h +#include linux/tee/tee_drv.h +#include tee_private.h + +static int tee_open(struct inode *inode, struct file *filp) +{ + int ret; + struct tee_device *teedev; + struct
[RFC PATCH 0/2] generic TEE subsystem
Hi, This patch set introduces a generic TEE subsystem. The TEE subssytem will be able contain drivers for various TEE implementations. A TEE (Trusted Execution Environment) is a trusted OS running in some secure environment, for example, TrustZone on ARM cpus, or a separate secure co-processor etc. Regarding use cases, TrustZone has traditionally been used for offloading secure tasks to the secure world. Examples include banking applications, Digital Rights Management (DRM), or specific secure solutions. This TEE subsystem can serve a TEE driver for a Global Platform compliant TEE, but it's not limited to only Global Platform TEEs. One reason why I'm doing this to be able to get an OP-TEE (https://github.com/OP-TEE/optee_os) driver upstream. The first patch brings in the generic TEE subsystem which helps when writing a driver for a specific TEE, for example, OP-TEE. The second patch is a mostly stubbed OP-TEE driver which shows briefly how a specific TEE driver uses the subsystem to register etc. I've tested this with a more complete OP-TEE driver, but I don't want to post that yet in the current shape. I will submit a complete OP-TEE driver when it's ready. Javier is also working on a driver for another TEE so we will soon have at least two TEE drivers under the TEE subsystem. Questions: * Where should we put this in the tree? I'm proposing drivers/tee and include/linux/tee here. Another place could be drivers/firmware/tee. I don't have a strong opinion on either place. * What should we have in the .compatible field in FDT for the OP-TEE driver? I'm proposing optee,optee-tz as OP-TEE doesn't really have a vendor. OP-TEE isn't limited to TrustZone, it can run in other environments too so optee-tz could be a way of keeping different options apart. I need advice here. * Who will maintain this? I'm willing to do it together with Javier. This patch set has been prepared in cooperation with Javier González who proposed Generic TrustZone Driver in Linux Kernel patches 28 Nov 2014, https://lwn.net/Articles/623380/ . We've since then changed the scope to TEE instead of TrustZone. We have discussed the design on tee-...@lists.linaro.org (archive at https://lists.linaro.org/pipermail/tee-dev/) with people from other companies, including Valentin Manea valentin.ma...@huawei.com, Emmanuel MICHEL emmanuel.mic...@st.com, Jean-michel DELORME jean-michel.delo...@st.com, and Joakim Bech joakim.b...@linaro.org. Our main concern has been to agree on something that is generic enough to support many different TEEs while still keeping the interface together. Regards, Jens Jens Wiklander (2): tee: generic TEE subsystem tee: add OP-TEE driver Documentation/ioctl/ioctl-number.txt | 1 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/tee/Kconfig | 18 ++ drivers/tee/Makefile | 4 + drivers/tee/optee/Kconfig| 7 + drivers/tee/optee/Makefile | 2 + drivers/tee/optee/core.c | 192 drivers/tee/tee.c| 253 +++ drivers/tee/tee_private.h| 64 +++ drivers/tee/tee_shm.c| 330 +++ drivers/tee/tee_shm_pool.c | 246 ++ include/linux/tee/tee.h | 180 +++ include/linux/tee/tee_drv.h | 271 14 files changed, 1571 insertions(+) create mode 100644 drivers/tee/Kconfig create mode 100644 drivers/tee/Makefile create mode 100644 drivers/tee/optee/Kconfig create mode 100644 drivers/tee/optee/Makefile create mode 100644 drivers/tee/optee/core.c create mode 100644 drivers/tee/tee.c create mode 100644 drivers/tee/tee_private.h create mode 100644 drivers/tee/tee_shm.c create mode 100644 drivers/tee/tee_shm_pool.c create mode 100644 include/linux/tee/tee.h create mode 100644 include/linux/tee/tee_drv.h -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[alsa-devel] [PATCH 2/2] mfd: arizona: Update DT binding to support hpdet channel
This patch add device tree bindings for the pdata needed to configure the Accessory Detect Mode select when Headphone detection. Signed-off-by: Inha Song ideal.s...@samsung.com --- Documentation/devicetree/bindings/mfd/arizona.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt index 7bd1273..e7cb939 100644 --- a/Documentation/devicetree/bindings/mfd/arizona.txt +++ b/Documentation/devicetree/bindings/mfd/arizona.txt @@ -49,6 +49,10 @@ Optional properties: input singals. If values less than the number of input signals, elements that has not been specifed are set to 0 by default. + - wlf,hpdet-channel : Headphone detection channel, this filed to be used the +ACCDET_MODE bits in the ACCESSORY_DETECT_MODE_1 register. The valid values +are 0 for HPDETL and 1 for HPDETR. + - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if they are being externally supplied. As covered in Documentation/devicetree/bindings/regulator/regulator.txt -- 2.0.0.390.gcb682f8 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] dmaengine: xgene-dma: Fix sparse wannings and coccinelle warnings
Hi Arnd, On Fri, Apr 17, 2015 at 2:19 PM, Arnd Bergmann a...@arndb.de wrote: On Friday 17 April 2015 01:01:13 Rameshwar Prasad Sahu wrote: v3 changes: * Minor changes in length setting in DMA descriptor v2 changes: * Code cleanup * Changed way of setting DMA descriptors for big-endian This patch fixes compilation sparse warnings like incorrect type in assignment (different base types), cast to restricted __le64, symbol '__UNIQUE_ID_author__COUNTER__' has multiple initializers etc and coccinelle warnings (No need to set .owner here. The core will do it.) This patch is based on slave-dma / for-linus branch. (commit: 9f2fd0dfa594d857fbdaeda523ff7a46f16567f5 [26/28] dmaengine: Add support for APM X-Gene SoC DMA engine driver) Reported-by: kbuild test robot fengguang...@intel.com Signed-off-by: Rameshwar Prasad Sahu rs...@apm.com Looks good now, Reviewed-by: Arnd Bergmann a...@arndb.de There is one small enhancement that you could still do and I'll shut up after that ;-) -static void *xgene_dma_lookup_ext8(u64 *desc, int idx) +static __le64 *xgene_dma_lookup_ext8(struct xgene_dma_desc_hw *desc, int idx) { - return (idx % 2) ? (desc + idx - 1) : (desc + idx + 1); + switch (idx) { + case 0: + return desc-m1; + case 1: + return desc-m0; + case 2: + return desc-m3; + case 3: + return desc-m2; + default: + pr_err(Invalid dma descriptor index\n); + } + + return NULL; } ... /* Set 1st to 5th source addresses */ for (i = 0; i src_cnt; i++) { len = *nbytes; - xgene_dma_set_src_buffer((i == 0) ? (desc1 + 8) : + xgene_dma_set_src_buffer((i == 0) ? desc1-m1 : xgene_dma_lookup_ext8(desc2, i - 1), len, src[i]); - XGENE_DMA_DESC_MULTI_SET(desc1, scf[i], i); + desc1-m2 |= cpu_to_le64((scf[i] ((i + 1) * 8))); } If you just unroll this loop, you get code that is smaller and easier to understand: /* Set 1st to 5th source addresses */ xgene_dma_set_src_buffer(desc1-m1, len, src[0]); xgene_dma_set_src_buffer(desc2-m0, len, src[1]); xgene_dma_set_src_buffer(desc2-m3, len, src[2]); xgene_dma_set_src_buffer(desc2-m2, len, src[3]); desc1-m2 |= cpu_to_le64(scf[0] | scf[1] 8 | scf[2] 16 | scf[3] 24); Actually here, in run time src_cnt value can be 2 or 3 upto 5, so we can't unroll it. Arnd -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: AM335x OMAP2 common clock external fixed-clock registration
On 17.04.2015 04:00, Michael Welling wrote: On Fri, Apr 17, 2015 at 01:23:50AM +0200, Sebastian Hesselbarth wrote: On 17.04.2015 00:09, Michael Welling wrote: On Thu, Apr 16, 2015 at 10:37:19PM +0200, Sebastian Hesselbarth wrote: On 16.04.2015 18:17, Michael Welling wrote: [...] What would be the proper error path? What cleanup is required? A proper error path would be to release any claimed resource on any error. If you look at the code, the only resources that need to be released are the two clocks in question. So for every error return in the probe function and in the of si5351_dt_parse it needs to clk_put first right? Not quite. The driver should clk_put() every clock that it called a [of_]clk_get() for. The thing is that clocks can be passed by platform_data and we never claim them. See attached patch to see if we are on the same page. Adding a .remove() function needs more care because of the pdata passed clocks. I admit that back when the driver was introduced clk_put() wasn't really necessary at all. [...] Here is what the kernel reports with debugging off: Do you have any measurement equipment to check what is actually set? Yes, I have an oscilloscope here at my desk. The reported numbers do not always correspond to the actual output in some cases. is not always correspond close or way off the requested frequency? Stability is an issue that I am aware of. Neither the datasheet nor the appnote were clear about any order the clocks should be set or how long we should wait between changing pll/ms/clkout parameters. SiLabs suggests to configure all clocks at once and never change them later, at least that is what you can read from the public documents. The drivers you mention below can however reveal some steps that have to be taken care of before and after changing parameters. The ms2 output has appeared to stop working all together sometime whilest testing. I may have to solder a new chip on there. Could misconfiguration damage the chip? You should know that a lot of things can damage a chip and misconfiguration is among them, yes. I cannot tell if that is the cause though. [...] Is there any way to try out a less recent kernel, let's say two or three releases before 4.0? Could you provide a specific version that you think has the best chances of working? My guess with 2-3 releases before 4.0 was because somewhere in between clk API must have switched from passing struct clk pointers to clk cookies. [...] From your patch (that you should inline next time please): @@ -1129,11 +1130,21 @@ static int si5351_dt_parse(struct i2c_client *client, return -ENOMEM; pdata-clk_xtal = of_clk_get(np, 0); - if (!IS_ERR(pdata-clk_xtal)) - clk_put(pdata-clk_xtal); - pdata-clk_clkin = of_clk_get(np, 1); - if (!IS_ERR(pdata-clk_clkin)) - clk_put(pdata-clk_clkin); + if (IS_ERR(pdata-clk_xtal)) { + dev_err(client-dev, + xtal clock not speficied\n); + return -ENODEV; + } + + if (variant == SI5351_VARIANT_C) { + pdata-clk_clkin = of_clk_get(np, 1); + if (IS_ERR(pdata-clk_clkin)) { + dev_err(client-dev, + clkin clock not speficied\n); + ret = -ENODEV; + goto err_put_clk_of; + } + } Basically, yes. But as I said, if you move that to the end of si5351_dt_parse() you won't have to add @ -1143,14 +1154,16 @@ static int si5351_dt_parse(struct i2c_client *client, if (num = 2) { dev_err(client-dev, invalid pll %d on pll-source prop\n, num); - return -EINVAL; + ret = -EINVAL; + goto err_put_clk_of; } this to each of the sanity checks. Claiming the clock resources at the end saves you from tearing down the resources on each error above. Another thing is that you now require VARIANT_C devices to always pass both, xtal and clkin. I can live with it until we find somebody who actually uses C-type devices with only one clock input connected. Adding a .remove() function to si5351 definitely needs more care with respect to claimed and pdata passed clocks. I am not sure we should go for it before we haven't ruled out the other issues. Sebastian -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 2/5] mmc: mediatek: Add Mediatek MMC driver
Ulf, On Tue, Mar 31, 2015 at 02:23:06PM +0200, Ulf Hansson wrote: On 17 March 2015 at 04:13, Chaotian Jing chaotian.j...@mediatek.com wrote: + + msdc_set_buswidth(host, ios-bus_width); + + /* Suspend/Resume will do power off/on */ + switch (ios-power_mode) { + case MMC_POWER_UP: + msdc_init_hw(host); + if (!IS_ERR(mmc-supply.vmmc)) { + ret = mmc_regulator_set_ocr(mmc, mmc-supply.vmmc, + ios-vdd); + if (ret) { + dev_err(host-dev, Failed to set vmmc power!\n); + return; + } + } + break; + case MMC_POWER_ON: + if (!IS_ERR(mmc-supply.vqmmc)) { + ret = regulator_enable(mmc-supply.vqmmc); The calls to regulator_enable|disable() for the vqmmc will not be balanced properly here. You need a local cache variable like is_enabled to keep track of this. Shouldn't the MMC core provide balanced hooks for this? What about MMC_POWER_UP, can this be used for enabling regulators? Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] dmaengine: xgene-dma: Fix sparse wannings and coccinelle warnings
On Friday 17 April 2015 14:41:02 Rameshwar Sahu wrote: -static void *xgene_dma_lookup_ext8(u64 *desc, int idx) +static __le64 *xgene_dma_lookup_ext8(struct xgene_dma_desc_hw *desc, int idx) { - return (idx % 2) ? (desc + idx - 1) : (desc + idx + 1); + switch (idx) { + case 0: + return desc-m1; + case 1: + return desc-m0; + case 2: + return desc-m3; + case 3: + return desc-m2; + default: + pr_err(Invalid dma descriptor index\n); + } + + return NULL; } ... /* Set 1st to 5th source addresses */ for (i = 0; i src_cnt; i++) { len = *nbytes; - xgene_dma_set_src_buffer((i == 0) ? (desc1 + 8) : + xgene_dma_set_src_buffer((i == 0) ? desc1-m1 : xgene_dma_lookup_ext8(desc2, i - 1), len, src[i]); - XGENE_DMA_DESC_MULTI_SET(desc1, scf[i], i); + desc1-m2 |= cpu_to_le64((scf[i] ((i + 1) * 8))); } If you just unroll this loop, you get code that is smaller and easier to understand: /* Set 1st to 5th source addresses */ xgene_dma_set_src_buffer(desc1-m1, len, src[0]); xgene_dma_set_src_buffer(desc2-m0, len, src[1]); xgene_dma_set_src_buffer(desc2-m3, len, src[2]); xgene_dma_set_src_buffer(desc2-m2, len, src[3]); desc1-m2 |= cpu_to_le64(scf[0] | scf[1] 8 | scf[2] 16 | scf[3] 24); Actually here, in run time src_cnt value can be 2 or 3 upto 5, so we can't unroll it. I see, sorry for misreading the code. The patch is good then as it is. Arnd -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [alsa-devel] [PATCH 2/2] mfd: arizona: Update DT binding to support hpdet channel
On Fri, Apr 17, 2015 at 05:32:59PM +0900, Inha Song wrote: This patch add device tree bindings for the pdata needed to configure the Accessory Detect Mode select when Headphone detection. Signed-off-by: Inha Song ideal.s...@samsung.com --- Documentation/devicetree/bindings/mfd/arizona.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt index 7bd1273..e7cb939 100644 --- a/Documentation/devicetree/bindings/mfd/arizona.txt +++ b/Documentation/devicetree/bindings/mfd/arizona.txt @@ -49,6 +49,10 @@ Optional properties: input singals. If values less than the number of input signals, elements that has not been specifed are set to 0 by default. + - wlf,hpdet-channel : Headphone detection channel, this filed to be used the +ACCDET_MODE bits in the ACCESSORY_DETECT_MODE_1 register. The valid values +are 0 for HPDETL and 1 for HPDETR. Lets remove the references to the register bits this tends to add some confusion to the binding doc review and update to mention the defines I suggested adding in the other patch. Thanks, Charles + - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if they are being externally supplied. As covered in Documentation/devicetree/bindings/regulator/regulator.txt -- 2.0.0.390.gcb682f8 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 2/5] mmc: mediatek: Add Mediatek MMC driver
On 17 April 2015 at 11:12, Sascha Hauer s.ha...@pengutronix.de wrote: Ulf, On Tue, Mar 31, 2015 at 02:23:06PM +0200, Ulf Hansson wrote: On 17 March 2015 at 04:13, Chaotian Jing chaotian.j...@mediatek.com wrote: + + msdc_set_buswidth(host, ios-bus_width); + + /* Suspend/Resume will do power off/on */ + switch (ios-power_mode) { + case MMC_POWER_UP: + msdc_init_hw(host); + if (!IS_ERR(mmc-supply.vmmc)) { + ret = mmc_regulator_set_ocr(mmc, mmc-supply.vmmc, + ios-vdd); + if (ret) { + dev_err(host-dev, Failed to set vmmc power!\n); + return; + } + } + break; + case MMC_POWER_ON: + if (!IS_ERR(mmc-supply.vqmmc)) { + ret = regulator_enable(mmc-supply.vqmmc); The calls to regulator_enable|disable() for the vqmmc will not be balanced properly here. You need a local cache variable like is_enabled to keep track of this. Shouldn't the MMC core provide balanced hooks for this? What about MMC_POWER_UP, can this be used for enabling regulators? Currently host drivers deals with vqmmc enabling/disabling, setting voltage, etc - entirely by them selves. Dough Anderson is working on fixing that: http://lkml.iu.edu/hypermail/linux/kernel/1503.1/03108.html MMC_POWER_UP is when vmmc shall be enabled. MMC_POWER_ON is when vqmmc shall be enabled. Kind regards Uffe -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [alsa-devel] [PATCH 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection
On Fri, Apr 17, 2015 at 05:32:58PM +0900, Inha Song wrote: This patch add support for select accessory detect mode to HPDETL or HPDETR. Arizona provides a headphone detection circuit on the HPDETL and HPDETR pins to measure the impedance of an external load connected to the headphone. Depending on board design, headphone detect pins can change to HPDETR or HPDETL. Signed-off-by: Inha Song ideal.s...@samsung.com --- drivers/extcon/extcon-arizona.c | 34 ++ include/linux/mfd/arizona/pdata.h | 3 +++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 63f01c4..7bc9159 100644 --- a/drivers/extcon/extcon-arizona.c +#ifdef CONFIG_OF +static int arizona_of_get_extcon_pdata(struct arizona *arizona) +{ + struct arizona_pdata *pdata = arizona-pdata; + + of_property_read_u32(arizona-dev-of_node, wlf,hpdet-channel, + pdata-hpdet_channel); + + return 0; +} +#else +static inline int arizona_of_get_extcon_pdata(struct arizona *arizona) +{ + return 0; +} +#endif Oh and one other comment can we rename this functions to arizona_extcon_of_get_pdata. Thanks, Charles -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC/PATCH v2 3/5] devicetree: bindings: Add new cpuidle enable method for Renesas R-car SoCs
On Thu, Apr 16, 2015 at 11:35:38AM +0100, Keita Kobayashi wrote: This patch add the ARM CPUs Device Tree binding to document a new enable method of Renesas cpuidle. Signed-off-by: Keita Kobayashi keita.kobayashi...@renesas.com --- Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 8b9e0a9..663ee11 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt @@ -196,6 +196,7 @@ nodes to be present and contain the properties described below. qcom,gcc-msm8660 qcom,kpss-acc-v1 qcom,kpss-acc-v2 + renesas,rcar-idle The enable-method is about how to bring the CPU up (and potentially implies other things, like how to take it down again). These is no code in this series to that effect, no semantics are provided, and the name implies this is idle-specific. So this doesn't look right, and makes no sense to me. Mark. -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] clocksource: arm_global_timer: Detect if gt is usable with CPU_FREQ
Hi Srini, Ola, Maxime, On Tue, 14 Apr 2015, Maxime Coquelin wrote: On 04/14/2015 09:41 AM, Srinivas Kandagatla wrote: +Adding Pete and Maxime Thanks Srini, as I wouldn't have seen this otherwise. snip + This patch would not let the SOC like STiH415/416 or zynq with tied-to-cpu-freq property to boot with multi_v7_defconfig. Which is not correct thing to do, as STi SOC's do not use cpufreq driver however the tick is tied to this clocksource. Yes, you are right, but I don't see any cleaner way to do this. On STi, we have another timer we can use as a clocksource when doing CPU Freq, the ST LPC timer. It is not upstreamed yet, but we will try to have it for next release. I just sent a series to add the ST LPC timer to LKML, see here https://lkml.org/lkml/2015/4/17/181. I've tested this on stih410 and it works ok. I propose we set the tied-to-cpu-freq in GT node of STi family as soon as we enable the LPC timer one. Doing that, the STi boot won't break in multi_v7 config. However this lpc timer IP does not exist on stih415/6 SoCs, and I can't (so far at least) see any other timer which we could use. So basically we would still have a breakage on stih415/6 STi platforms with this proposed change. Upstreaming st_lpc.c timer is still worthwhile though as it paves the way for adding cpufreq support upstream for stih407 family. regards, Peter. -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] ARM: dts: tegra: Add labels to Tegra114 nodes
Add new labels to certain nodes on Tegra114 so they could be easily referenced by board DTS files. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/tegra114.dtsi | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi index f58a3d9d5f13..1b31cefd1047 100644 --- a/arch/arm/boot/dts/tegra114.dtsi +++ b/arch/arm/boot/dts/tegra114.dtsi @@ -10,7 +10,7 @@ compatible = nvidia,tegra114; interrupt-parent = lic; - host1x@5000 { + host1x: host1x@5000 { compatible = nvidia,tegra114-host1x, simple-bus; reg = 0x5000 0x00028000; interrupts = GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH, /* syncpt */ @@ -318,7 +318,7 @@ status = disabled; }; - i2c@7000c000 { + i2c1: i2c@7000c000 { compatible = nvidia,tegra114-i2c; reg = 0x7000c000 0x100; interrupts = GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH; @@ -363,7 +363,7 @@ status = disabled; }; - i2c@7000c700 { + i2c4: i2c@7000c700 { compatible = nvidia,tegra114-i2c; reg = 0x7000c700 0x100; interrupts = GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH; @@ -378,7 +378,7 @@ status = disabled; }; - i2c@7000d000 { + i2c5: i2c@7000d000 { compatible = nvidia,tegra114-i2c; reg = 0x7000d000 0x100; interrupts = GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH; @@ -438,7 +438,7 @@ status = disabled; }; - spi@7000da00 { + spi4: spi@7000da00 { compatible = nvidia,tegra114-spi; reg = 0x7000da00 0x200; interrupts = GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH; @@ -500,7 +500,7 @@ status = disabled; }; - pmc@7000e400 { + pmc: pmc@7000e400 { compatible = nvidia,tegra114-pmc; reg = 0x7000e400 0x400; clocks = tegra_car TEGRA114_CLK_PCLK, clk32k_in; @@ -527,7 +527,7 @@ #iommu-cells = 1; }; - ahub@7008 { + ahub: ahub@7008 { compatible = nvidia,tegra114-ahub; reg = 0x7008 0x200, 0x70080200 0x100, @@ -648,7 +648,7 @@ status = disabled; }; - sdhci@78000400 { + sdhci3: sdhci@78000400 { compatible = nvidia,tegra114-sdhci, nvidia,tegra30-sdhci; reg = 0x78000400 0x200; interrupts = GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH; @@ -658,7 +658,7 @@ status = disabled; }; - sdhci@78000600 { + sdhci4: sdhci@78000600 { compatible = nvidia,tegra114-sdhci, nvidia,tegra30-sdhci; reg = 0x78000600 0x200; interrupts = GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH; @@ -668,7 +668,7 @@ status = disabled; }; - usb@7d00 { + usb1: usb@7d00 { compatible = nvidia,tegra30-ehci, usb-ehci; reg = 0x7d00 0x4000; interrupts = GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH; @@ -704,7 +704,7 @@ status = disabled; }; - usb@7d008000 { + usb3: usb@7d008000 { compatible = nvidia,tegra30-ehci, usb-ehci; reg = 0x7d008000 0x4000; interrupts = GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC/PATCH v2 3/5] devicetree: bindings: Add new cpuidle enable method for Renesas R-car SoCs
Hi Mark, On Fri, Apr 17, 2015 at 9:46 PM, Mark Rutland mark.rutl...@arm.com wrote: On Thu, Apr 16, 2015 at 11:35:38AM +0100, Keita Kobayashi wrote: This patch add the ARM CPUs Device Tree binding to document a new enable method of Renesas cpuidle. Signed-off-by: Keita Kobayashi keita.kobayashi...@renesas.com --- Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 8b9e0a9..663ee11 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt @@ -196,6 +196,7 @@ nodes to be present and contain the properties described below. qcom,gcc-msm8660 qcom,kpss-acc-v1 qcom,kpss-acc-v2 + renesas,rcar-idle The enable-method is about how to bring the CPU up (and potentially implies other things, like how to take it down again). Thanks for your clarification. I now understand that this is related to SMP boot and CPU Hotplug. These is no code in this series to that effect, no semantics are provided, and the name implies this is idle-specific. So this doesn't look right, and makes no sense to me. Ok, I somehow (incorrectly?) assumed that the following line in patch 2/5* tied into this: +CPUIDLE_METHOD_OF_DECLARE(rcar, renesas,rcar-idle, rcar_cpuidle_ops); [*] [RFC/PATCH v2 2/5] ARM: shmobile: Add cpuidle_ops for R-Car cpuidle But if it is unrelated it should of course be dropped or reworked. Thanks, / magnus -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC/PATCH v2 3/5] devicetree: bindings: Add new cpuidle enable method for Renesas R-car SoCs
Hi Kobayashi-san, On Thu, Apr 16, 2015 at 7:35 PM, Keita Kobayashi keita.kobayashi...@renesas.com wrote: This patch add the ARM CPUs Device Tree binding to document a new enable method of Renesas cpuidle. Signed-off-by: Keita Kobayashi keita.kobayashi...@renesas.com --- Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 8b9e0a9..663ee11 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt @@ -196,6 +196,7 @@ nodes to be present and contain the properties described below. qcom,gcc-msm8660 qcom,kpss-acc-v1 qcom,kpss-acc-v2 + renesas,rcar-idle rockchip,rk3066-smp - cpu-release-addr I don't mind this portion so much and I can see other vendors are using this format. And with risk of upsetting the DT police I have to mention my doubts about why we need this particular piece of binding. The proposed string by this patch does not seem to describe any hardware but it is aligned to other existing stings referring to software such as spin-table and psci. From a C code implementation point of view we would get enough information to make a good decision by just checking SoC compatible string. At the same time, this seems to be the standard way of doing things and standard is good. So if we should turn this into something that describes actual hardware, how about pointing out the APMU hardware that is actually managing the Core Standby mode that this CPUIdle implementation is invoking? May I suggest using renesas,rcar-apmu? Or perhaps to be safe we should do per-SoC string like in other cases like renesas,r8a7791-apmu? Or is there some way we can make this work without adding a new binding? Thanks, / magnus -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] ARM: dts: s3c2416: Add labels to S3C2416 nodes
Add new labels to certain nodes on S3C2416 so they could be easily referenced by board DTS files. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/s3c2416.dtsi | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/s3c2416.dtsi b/arch/arm/boot/dts/s3c2416.dtsi index 30b8f7e47454..a5184ff56933 100644 --- a/arch/arm/boot/dts/s3c2416.dtsi +++ b/arch/arm/boot/dts/s3c2416.dtsi @@ -17,7 +17,7 @@ compatible = samsung,s3c2416; aliases { - serial3 = uart3; + serial3 = uart_3; }; cpus { @@ -48,7 +48,7 @@ clock-names = timers; }; - serial@5000 { + uart_0: serial@5000 { compatible = samsung,s3c2440-uart; clock-names = uart, clk_uart_baud2, clk_uart_baud3; @@ -56,7 +56,7 @@ clocks SCLK_UART; }; - serial@50004000 { + uart_1: serial@50004000 { compatible = samsung,s3c2440-uart; clock-names = uart, clk_uart_baud2, clk_uart_baud3; @@ -64,7 +64,7 @@ clocks SCLK_UART; }; - serial@50008000 { + uart_2: serial@50008000 { compatible = samsung,s3c2440-uart; clock-names = uart, clk_uart_baud2, clk_uart_baud3; @@ -72,7 +72,7 @@ clocks SCLK_UART; }; - uart3: serial@5000C000 { + uart_3: serial@5000C000 { compatible = samsung,s3c2440-uart; reg = 0x5000C000 0x4000; interrupts = 1 18 24 4, 1 18 25 4; @@ -83,7 +83,7 @@ status = disabled; }; - sdhci@4AC0 { + sdhci_1: sdhci@4AC0 { compatible = samsung,s3c6410-sdhci; reg = 0x4AC0 0x100; interrupts = 0 0 21 3; @@ -94,7 +94,7 @@ status = disabled; }; - sdhci@4A80 { + sdhci_0: sdhci@4A80 { compatible = samsung,s3c6410-sdhci; reg = 0x4A80 0x100; interrupts = 0 0 20 3; @@ -105,13 +105,13 @@ status = disabled; }; - watchdog@5300 { + watchdog: watchdog@5300 { interrupts = 1 9 27 3; clocks = clocks PCLK_WDT; clock-names = watchdog; }; - rtc@5700 { + rtc: rtc@5700 { compatible = samsung,s3c2416-rtc; clocks = clocks PCLK_RTC; clock-names = rtc; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] crypto: add new driver for Marvell CESA
Hi Boris, On 17/04/2015 10:39, Boris Brezillon wrote: On Fri, 17 Apr 2015 10:33:56 +0200 Boris Brezillon boris.brezil...@free-electrons.com wrote: Hi Jason, On Mon, 13 Apr 2015 20:11:46 + Jason Cooper ja...@lakedaemon.net wrote: I'd appreciate if we'd look into it. I understand from on-list and off-list discussion that the rewrite was unavoidable. So I'm willing to concede that. Giving people time to migrate from old to new while still being able to update for other security fixes seems reasonable. Jason, what do you think of the approach above? I say keep it simple. We shouldn't use the DT changes to trigger one vice the other. We need to be able to build both, but only load one at a time. If that's anything other than simple to do, then we make it a Kconfig binary choice and move on. Actually I was planning to handle it with a Kconfig dependency rule (NEW_DRIVER depends on !OLD_DRIVER and OLD_DRIVER depends on !NEW_DRIVER). I don't know how to make it a runtime check without adding new compatible strings for the kirkwood, dove and orion platforms, and I'm sure sure this is a good idea. ^ not Do you have any ideas ? You use devm_ioremap_resource() in the new driver, so if the old one is already loaded the memory region will be already hold and the new driver will simply fail during the probe. So for this part it is OK. However, the old driver doesn't try to reserve the region, it directly uses an ioremap(). So if the new driver is loaded first, then the old one will manage to be loaded too. I think that just adding a request_region()/release_region() (or converting the ioremap in a devm_ioremap_resource() in the old driver would be enough. Gregory -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] ARM: dts: s3c2416: Use labels for overriding nodes in SMDK2416
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/s3c2416-smdk2416.dts | 86 +- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/arch/arm/boot/dts/s3c2416-smdk2416.dts b/arch/arm/boot/dts/s3c2416-smdk2416.dts index ea92fd69529a..f257926c13b7 100644 --- a/arch/arm/boot/dts/s3c2416-smdk2416.dts +++ b/arch/arm/boot/dts/s3c2416-smdk2416.dts @@ -31,55 +31,55 @@ #clock-cells = 0; }; }; +}; - serial@5000 { - status = okay; - pinctrl-names = default; - pinctrl-0 = uart0_data, uart0_fctl; - }; +rtc { + status = okay; +}; - serial@50004000 { - status = okay; - pinctrl-names = default; - pinctrl-0 = uart1_data, uart1_fctl; - }; +sdhci_0 { + pinctrl-names = default; + pinctrl-0 = sd1_clk, sd1_cmd, + sd1_bus1, sd1_bus4; + bus-width = 4; + broken-cd; + status = okay; +}; - serial@50008000 { - status = okay; - pinctrl-names = default; - pinctrl-0 = uart2_data; - }; +sdhci_1 { + pinctrl-names = default; + pinctrl-0 = sd0_clk, sd0_cmd, + sd0_bus1, sd0_bus4; + bus-width = 4; + cd-gpios = gpf 1 0; + cd-inverted; + status = okay; +}; - serial@5000C000 { - status = okay; - pinctrl-names = default; - pinctrl-0 = uart3_data; - }; +uart_0 { + status = okay; + pinctrl-names = default; + pinctrl-0 = uart0_data, uart0_fctl; +}; - watchdog@5300 { - status = okay; - }; +uart_1 { + status = okay; + pinctrl-names = default; + pinctrl-0 = uart1_data, uart1_fctl; +}; - rtc@5700 { - status = okay; - }; +uart_2 { + status = okay; + pinctrl-names = default; + pinctrl-0 = uart2_data; +}; - sdhci@4AC0 { - pinctrl-names = default; - pinctrl-0 = sd0_clk, sd0_cmd, - sd0_bus1, sd0_bus4; - bus-width = 4; - cd-gpios = gpf 1 0; - cd-inverted; - status = okay; - }; +uart_3 { + status = okay; + pinctrl-names = default; + pinctrl-0 = uart3_data; +}; - sdhci@4A80 { - pinctrl-names = default; - pinctrl-0 = sd1_clk, sd1_cmd, - sd1_bus1, sd1_bus4; - bus-width = 4; - broken-cd; - status = okay; - }; +watchdog { + status = okay; }; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] ARM: dts: tegra: Use labels for overriding nodes in Tegra114 boards
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/tegra114-dalmore.dts | 2210 arch/arm/boot/dts/tegra114-roth.dts| 1945 ++-- arch/arm/boot/dts/tegra114-tn7.dts | 459 --- 3 files changed, 2307 insertions(+), 2307 deletions(-) diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts index 8b7aa0dcdc6e..c85129897472 100644 --- a/arch/arm/boot/dts/tegra114-dalmore.dts +++ b/arch/arm/boot/dts/tegra114-dalmore.dts @@ -22, +22,6 @@ reg = 0x8000 0x4000; }; - host1x@5000 { - hdmi@5428 { - status = okay; - - hdmi-supply = vdd_5v0_hdmi; - vdd-supply = vdd_hdmi_reg; - pll-supply = palmas_smps3_reg; - - nvidia,ddc-i2c-bus = hdmi_ddc; - nvidia,hpd-gpio = - gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH; - }; - - dsi@5430 { - status = okay; - - avdd-dsi-csi-supply = avdd_1v2_reg; - - panel@0 { - compatible = panasonic,vvx10f004b00, -simple-panel; - reg = 0; - - power-supply = avdd_lcd_reg; - backlight = backlight; - }; - }; - }; - - pinmux@7868 { - pinctrl-names = default; - pinctrl-0 = state_default; - - state_default: pinmux { - clk1_out_pw4 { - nvidia,pins = clk1_out_pw4; - nvidia,function = extperiph1; - nvidia,pull = TEGRA_PIN_PULL_NONE; - nvidia,tristate = TEGRA_PIN_DISABLE; - nvidia,enable-input = TEGRA_PIN_DISABLE; - }; - dap1_din_pn1 { - nvidia,pins = dap1_din_pn1; - nvidia,function = i2s0; - nvidia,pull = TEGRA_PIN_PULL_NONE; - nvidia,tristate = TEGRA_PIN_ENABLE; - nvidia,enable-input = TEGRA_PIN_ENABLE; - }; - dap1_dout_pn2 { - nvidia,pins = dap1_dout_pn2, - dap1_fs_pn0, - dap1_sclk_pn3; - nvidia,function = i2s0; - nvidia,pull = TEGRA_PIN_PULL_NONE; - nvidia,tristate = TEGRA_PIN_DISABLE; - nvidia,enable-input = TEGRA_PIN_ENABLE; - }; - dap2_din_pa4 { - nvidia,pins = dap2_din_pa4; - nvidia,function = i2s1; - nvidia,pull = TEGRA_PIN_PULL_NONE; - nvidia,tristate = TEGRA_PIN_ENABLE; - nvidia,enable-input = TEGRA_PIN_ENABLE; - }; - dap2_dout_pa5 { - nvidia,pins = dap2_dout_pa5, - dap2_fs_pa2, - dap2_sclk_pa3; - nvidia,function = i2s1; - nvidia,pull = TEGRA_PIN_PULL_NONE; - nvidia,tristate = TEGRA_PIN_DISABLE; - nvidia,enable-input = TEGRA_PIN_ENABLE; - }; - dap4_din_pp5 { - nvidia,pins = dap4_din_pp5, - dap4_dout_pp6, - dap4_fs_pp4, - dap4_sclk_pp7; - nvidia,function = i2s3; - nvidia,pull = TEGRA_PIN_PULL_NONE; - nvidia,tristate = TEGRA_PIN_DISABLE; - nvidia,enable-input = TEGRA_PIN_ENABLE; - }; - dvfs_pwm_px0 { - nvidia,pins = dvfs_pwm_px0, - dvfs_clk_px2; - nvidia,function = cldvfs; - nvidia,pull = TEGRA_PIN_PULL_NONE; - nvidia,tristate = TEGRA_PIN_DISABLE; -
[PATCH 04/14] devicetree: Add bindings for the ATH79 interrupt controllers
Signed-off-by: Alban Bedel al...@free.fr --- .../interrupt-controller/qca,ath79-cpu-intc.txt| 45 ++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/qca,ath79-cpu-intc.txt diff --git a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-cpu-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-cpu-intc.txt new file mode 100644 index 000..1548512 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-cpu-intc.txt @@ -0,0 +1,45 @@ +Binding for Qualcomm Atheros AR7xxx/AR9XXX CPU interrupt controller + +On most SoC the IRQ controller need to flush the DDR FIFO before running +the interrupt handler of some devices. This is configured using the +qca,ddr-wb-channels and qca,ddr-wb-channel-interrupts properties. + +Required Properties: + +- compatible: has to be qca,soctype-cpu-intc, qca,ar7100-cpu-intc + as fallback +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode interrupt +source, should be 1 for intc + +Please refer to interrupts.txt in this directory for details of the common +Interrupt Controllers bindings used by client devices. + +Optional Properties: + +- qca,ddr-wb-channel-interrupts: List of the interrupts needing a write + buffer flush +- qca,ddr-wb-channels: List of phandles to the write buffer channels for + each interrupt. If qca,ddr-wb-channel-interrupts is not present the interrupt + default to the entry's index. + +Example: + + cpuintc@0 { + compatible = qca,ar9132-cpu-intc, qca,ar7100-cpu-intc; + + interrupt-controller; + #interrupt-cells = 1; + + qca,ddr-wb-channel-interrupts = 2, 3, 4, 5; + qca,ddr-wb-channels = ddr_ctrl 3, ddr_ctrl 2, + ddr_ctrl 0, ddr_ctrl 1; + }; + + ... + + ddr_ctrl: ddr-controller@1800 { + ... + #qca,ddr-wb-channel-cells = 1; + }; + -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 17/17] crypto: talitos - Update DT bindings with SEC1
This patch updates the documentation by including SEC1 into SEC2/3 doc Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- Documentation/devicetree/bindings/crypto/fsl-sec2.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec2.txt b/Documentation/devicetree/bindings/crypto/fsl-sec2.txt index 38988ef..f0d926b 100644 --- a/Documentation/devicetree/bindings/crypto/fsl-sec2.txt +++ b/Documentation/devicetree/bindings/crypto/fsl-sec2.txt @@ -1,9 +1,11 @@ -Freescale SoC SEC Security Engines versions 2.x-3.x +Freescale SoC SEC Security Engines versions 1.x-2.x-3.x Required properties: - compatible : Should contain entries for this and backward compatible - SEC versions, high to low, e.g., fsl,sec2.1, fsl,sec2.0 + SEC versions, high to low, e.g., fsl,sec2.1, fsl,sec2.0 (SEC2/3) + e.g., fsl,sec1.2, fsl,sec1.0 (SEC1) +warning: SEC1 and SEC2 are mutually exclusive - reg : Offset and length of the register set for the device - interrupts : the SEC's interrupt number - fsl,num-channels : An integer representing the number of channels -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 05/14] devicetree: Add bindings for the ATH79 MISC interrupt controllers
Signed-off-by: Alban Bedel al...@free.fr --- .../interrupt-controller/qca,ath79-misc-intc.txt | 30 ++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt diff --git a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt new file mode 100644 index 000..11b54dd --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt @@ -0,0 +1,30 @@ +Binding for Qualcomm Atheros AR7xxx/AR9XXX MISC interrupt controller + +The MISC interrupt controller is a secondary controller for lower priority +interrupt. + +Required Properties: +- compatible: has to be qca,soctype-cpu-intc, qca,ar7100-misc-intc + as fallback +- reg: Base address and size of the controllers memory area +- interrupt-parent: phandle of the parent interrupt controller. +- interrupts: Interrupt specifier for the controllers interrupt. +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode interrupt +source, should be 1 + +Please refer to interrupts.txt in this directory for details of the common +Interrupt Controllers bindings used by client devices. + +Example: + + miscintc@18060010 { + compatible = qca,ar9132-misc-intc, qca,ar7100-misc-intc; + reg = 0x18060010 0x4; + + interrupt-parent = cpuintc; + interrupts = 6; + + interrupt-controller; + #interrupt-cells = 1; + }; -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 10/14] devicetree: Add bindings for the ATH79 GPIO controllers
These bindings support the GPIO controllers found on the Qualcomm Atheros AR7xxx/AR9XXX SoC. Signed-off-by: Alban Bedel al...@free.fr --- .../devicetree/bindings/gpio/gpio-ath79.txt| 40 ++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-ath79.txt diff --git a/Documentation/devicetree/bindings/gpio/gpio-ath79.txt b/Documentation/devicetree/bindings/gpio/gpio-ath79.txt new file mode 100644 index 000..663c0b6 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-ath79.txt @@ -0,0 +1,40 @@ +Binding for Qualcomm Atheros AR7xxx/AR9xxx GPIO controller + +Required properties: +- compatible: has to be qca,soctype-gpio and one of the following + fallback: + - qca,ar7100-gpio + - qca,ar7240-gpio + - qca,ar7241-gpio + - qca,ar9130-gpio + - qca,ar9330-gpio + - qca,ar9340-gpio + - qca,qca9550-gpio +- reg: Base address and size of the controllers memory area +- gpio-controller : Marks the device node as a GPIO controller. +- #gpio-cells : Should be two. The first cell is the pin number and the + second cell is used to specify optional parameters. + +Optional properties: +- interrupt-parent: phandle of the parent interrupt controller. +- interrupts: Interrupt specifier for the controllers interrupt. +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode interrupt +source, should be 2 + +Please refer to interrupts.txt in this directory for details of the common +Interrupt Controllers bindings used by client devices. + +Example: + + gpio@1804 { + compatible = qca,ar9132-gpio, qca,ar9130-gpio; + reg = 0x1804 0x30; + interrupts = 2; + + gpio-controller; + #gpio-cells = 2; + + interrupt-controller; + #interrupt-cells = 2; + }; -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 07/14] devicetree: Add bindings for the ATH79 PLL controllers
Signed-off-by: Alban Bedel al...@free.fr --- .../devicetree/bindings/clock/qca,ath79-pll.txt| 33 ++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qca,ath79-pll.txt diff --git a/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt b/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt new file mode 100644 index 000..2d2da3f --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt @@ -0,0 +1,33 @@ +Binding for Qualcomm Atheros AR7xxx/AR9XXX PLL controller + +The PPL controller provides the 3 main clocks of the SoC: CPU, DDR and AHB. + +Required Properties: +- compatible: has to be qca,soctype-cpu-intc and one of the following + fallback: + - qca,ar7100-pll + - qca,ar7240-pll + - qca,ar9130-pll + - qca,ar9330-pll + - qca,ar9340-pll + - qca,ar9550-pll +- reg: Base address and size of the controllers memory area +- clock-names: Name of the input clock, has to be ref +- clock: phandle of the external reference clock +- #clock-cells: has to be one + +Optional properties: +- clock-output-names: should be cpu, ddr, ahb + +Example: + + pll-controller@1805 { + compatible = qca,ar9132-ppl, qca,ar9130-pll; + reg = 0x1805 0x20; + + clock-names = ref; + clocks = extosc; + + #clock-cells = 1; + clock-output-names = cpu, ddr, ahb; + }; -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V1 2/6] regulator: da9062: DA9062 regulator driver
From: S Twiss stwiss.opensou...@diasemi.com Add BUCK and LDO regulator driver support for DA9062 Signed-off-by: Steve Twiss stwiss.opensou...@diasemi.com --- This patch applies against linux-next and v4.0 drivers/regulator/Kconfig| 10 + drivers/regulator/Makefile | 1 + drivers/regulator/da9062-regulator.c | 968 +++ 3 files changed, 979 insertions(+) create mode 100644 drivers/regulator/da9062-regulator.c diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index a6f116a..1fd6dc3 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -178,6 +178,16 @@ config REGULATOR_DA9055 This driver can also be built as a module. If so, the module will be called da9055-regulator. +config REGULATOR_DA9062 + tristate Dialog Semiconductor DA9062 regulators + depends on MFD_DA9062 + help + Say y here to support the BUCKs and LDOs regulators found on + DA9062 PMICs. + + This driver can also be built as a module. If so, the module + will be called da9062-regulator. + config REGULATOR_DA9063 tristate Dialog Semiconductor DA9063 regulators depends on MFD_DA9063 diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 2c4da15..12ecb65 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -25,6 +25,7 @@ obj-$(CONFIG_REGULATOR_BCM590XX) += bcm590xx-regulator.o obj-$(CONFIG_REGULATOR_DA903X) += da903x.o obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o obj-$(CONFIG_REGULATOR_DA9055) += da9055-regulator.o +obj-$(CONFIG_REGULATOR_DA9062) += da9062-regulator.o obj-$(CONFIG_REGULATOR_DA9063) += da9063-regulator.o obj-$(CONFIG_REGULATOR_DA9210) += da9210-regulator.o obj-$(CONFIG_REGULATOR_DA9211) += da9211-regulator.o diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c new file mode 100644 index 000..503e395 --- /dev/null +++ b/drivers/regulator/da9062-regulator.c @@ -0,0 +1,968 @@ +/* + * da9062-regulator.c - REGULATOR device driver for DA9062 + * Copyright (C) 2015 Dialog Semiconductor Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#include linux/kernel.h +#include linux/module.h +#include linux/init.h +#include linux/err.h +#include linux/slab.h +#include linux/of.h +#include linux/platform_device.h +#include linux/regmap.h +#include linux/regulator/driver.h +#include linux/regulator/machine.h +#include linux/regulator/of_regulator.h +#include linux/mfd/da9062/core.h +#include linux/mfd/da9062/registers.h + +/* Regulator IDs */ +enum { + DA9062_ID_BUCK1, + DA9062_ID_BUCK2, + DA9062_ID_BUCK3, + DA9062_ID_BUCK4, + DA9062_ID_LDO1, + DA9062_ID_LDO2, + DA9062_ID_LDO3, + DA9062_ID_LDO4, +}; + +/* Regulator capabilities and registers description */ +struct da9062_regulator_info { + struct regulator_desc desc; + /* Current limiting */ + unsigned int n_current_limits; + const int *current_limits; + /* Main register fields */ + struct reg_field mode; + struct reg_field suspend; + struct reg_field sleep; + struct reg_field suspend_sleep; + unsigned int suspend_vsel_reg; + struct reg_field ilimit; + /* Event detection bit */ + struct reg_field oc_event; +}; + +/* Single regulator settings */ +struct da9062_regulator { + struct regulator_desc desc; + struct regulator_dev*rdev; + struct da9062 *hw; + const struct da9062_regulator_info *info; + + struct regmap_field *mode; + struct regmap_field *suspend; + struct regmap_field *sleep; + struct regmap_field *suspend_sleep; + struct regmap_field *ilimit; +}; + +/* Encapsulates all information for the regulators driver */ +struct da9062_regulators { + int irq_ldo_lim; + int irq_vdd_warn; + unsignedn_regulators; + /* Array size to be defined during init. Keep at end. */ + struct da9062_regulator regulator[0]; +}; + +/* BUCK modes */ +enum { + BUCK_MODE_MANUAL, /* 0 */ + BUCK_MODE_SLEEP,/* 1 */ + BUCK_MODE_SYNC, /* 2 */ +
[PATCH V1 1/6] mfd: da9062: DA9062 MFD core driver
From: S Twiss stwiss.opensou...@diasemi.com Add MFD core driver support for DA9062 Signed-off-by: Steve Twiss stwiss.opensou...@diasemi.com --- This patch applies against linux-next and v4.0 drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile |3 +- drivers/mfd/da9062-core.c| 611 +++ include/linux/mfd/da9062/core.h | 61 ++ include/linux/mfd/da9062/registers.h | 1108 ++ 5 files changed, 1794 insertions(+), 1 deletion(-) create mode 100644 drivers/mfd/da9062-core.c create mode 100644 include/linux/mfd/da9062/core.h create mode 100644 include/linux/mfd/da9062/registers.h diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 38356e3..37ff888 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -183,6 +183,18 @@ config MFD_DA9055 This driver can be built as a module. If built as a module it will be called da9055 +config MFD_DA9062 + bool Dialog Semiconductor DA9062 PMIC Support + select MFD_CORE + select REGMAP_I2C + select REGMAP_IRQ + depends on I2C=y + help + Say yes here for support for the Dialog Semiconductor DA9062 PMIC. + This includes the I2C driver and core APIs. + Additional drivers must be enabled in order to use the functionality + of the device. + config MFD_DA9063 bool Dialog Semiconductor DA9063 PMIC Support select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 19f3d74..f20a727 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -110,10 +110,11 @@ obj-$(CONFIG_MFD_LP8788) += lp8788.o lp8788-irq.o da9055-objs:= da9055-core.o da9055-i2c.o obj-$(CONFIG_MFD_DA9055) += da9055.o - +obj-$(CONFIG_MFD_DA9062) += da9062-core.o da9063-objs:= da9063-core.o da9063-irq.o da9063-i2c.o obj-$(CONFIG_MFD_DA9063) += da9063.o obj-$(CONFIG_MFD_DA9150) += da9150-core.o + obj-$(CONFIG_MFD_MAX14577) += max14577.o obj-$(CONFIG_MFD_MAX77686) += max77686.o obj-$(CONFIG_MFD_MAX77693) += max77693.o diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c new file mode 100644 index 000..dd99e0f --- /dev/null +++ b/drivers/mfd/da9062-core.c @@ -0,0 +1,611 @@ +/* + * da9062-core.c - CORE device driver for DA9062 + * Copyright (C) 2015 Dialog Semiconductor Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/kernel.h +#include linux/module.h +#include linux/init.h +#include linux/slab.h +#include linux/device.h +#include linux/delay.h +#include linux/interrupt.h +#include linux/mutex.h +#include linux/regmap.h + +#include linux/irq.h +#include linux/mfd/core.h +#include linux/i2c.h +#include linux/err.h + +#include linux/mfd/da9062/core.h +#include linux/mfd/da9062/registers.h +#include linux/of.h +#include linux/regulator/of_regulator.h + +#include linux/proc_fs.h +#include linux/kthread.h +#include linux/uaccess.h + +/* IRQ device driver for DA9062 */ + +#defineDA9062_REG_EVENT_A_OFFSET 0 +#defineDA9062_REG_EVENT_B_OFFSET 1 +#defineDA9062_REG_EVENT_C_OFFSET 2 + +static struct regmap_irq da9062_irqs[] = { + /* EVENT A */ + [DA9062_IRQ_ONKEY] = { + .reg_offset = DA9062_REG_EVENT_A_OFFSET, + .mask = DA9062AA_M_NONKEY_MASK, + }, + [DA9062_IRQ_ALARM] = { + .reg_offset = DA9062_REG_EVENT_A_OFFSET, + .mask = DA9062AA_M_ALARM_MASK, + }, + [DA9062_IRQ_TICK] = { + .reg_offset = DA9062_REG_EVENT_A_OFFSET, + .mask = DA9062AA_M_TICK_MASK, + }, + [DA9062_IRQ_WDG_WARN] = { + .reg_offset = DA9062_REG_EVENT_A_OFFSET, + .mask = DA9062AA_M_WDG_WARN_MASK, + }, + [DA9062_IRQ_SEQ_RDY] = { + .reg_offset = DA9062_REG_EVENT_A_OFFSET, + .mask = DA9062AA_M_SEQ_RDY_MASK, + }, + /* EVENT B */ + [DA9062_IRQ_TEMP] = { + .reg_offset = DA9062_REG_EVENT_B_OFFSET, + .mask = DA9062AA_M_TEMP_MASK, + }, + [DA9062_IRQ_LDO_LIM] = { + .reg_offset = DA9062_REG_EVENT_B_OFFSET, + .mask = DA9062AA_M_LDO_LIM_MASK, + }, + [DA9062_IRQ_DVC_RDY] = { + .reg_offset = DA9062_REG_EVENT_B_OFFSET, + .mask = DA9062AA_M_DVC_RDY_MASK, + }, +
[PATCH V1 0/6] COVER LETTER
From: S Twiss stwiss.opensou...@diasemi.com This patch set adds support for the Dialog DA9062 Power Management IC. In this patch set the following is provided: - [PATCH V1 1/6]: MFD core support - [PATCH V1 2/6]: BUCK and LDO regulator driver - [PATCH V1 3/6]: RTC driver - [PATCH V1 4/6]: OnKey driver - [PATCH V1 5/6]: Watchdog driver - [PATCH V1 6/6]: Add bindings for all DA9062 components This patch applies against linux-next and v4.0 Thank you, Steve Twiss, Dialog Semiconductor Ltd. S Twiss (6): mfd: da9062: DA9062 MFD core driver regulator: da9062: DA9062 regulator driver rtc: da9062: DA9062 RTC driver input: misc: onkey: da9062: DA9062 OnKey driver watchdog: da9062: DA9062 watchdog driver devicetree: da9062: Add bindings for DA9062 driver Documentation/devicetree/bindings/mfd/da9062.txt | 107 +++ drivers/input/misc/Kconfig | 10 + drivers/input/misc/Makefile |1 + drivers/input/misc/da9062-onkey.c| 223 + drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile |3 +- drivers/mfd/da9062-core.c| 611 drivers/regulator/Kconfig| 10 + drivers/regulator/Makefile |1 + drivers/regulator/da9062-regulator.c | 968 +++ drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile |1 + drivers/rtc/rtc-da9062.c | 367 +++ drivers/watchdog/Kconfig |9 + drivers/watchdog/Makefile|1 + drivers/watchdog/da9062_wdt.c| 249 + include/linux/mfd/da9062/core.h | 61 ++ include/linux/mfd/da9062/registers.h | 1108 ++ 18 files changed, 3751 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/mfd/da9062.txt create mode 100644 drivers/input/misc/da9062-onkey.c create mode 100644 drivers/mfd/da9062-core.c create mode 100644 drivers/regulator/da9062-regulator.c create mode 100644 drivers/rtc/rtc-da9062.c create mode 100644 drivers/watchdog/da9062_wdt.c create mode 100644 include/linux/mfd/da9062/core.h create mode 100644 include/linux/mfd/da9062/registers.h -- end-of-patch for PATCH V1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V1 5/6] watchdog: da9062: DA9062 watchdog driver
From: S Twiss stwiss.opensou...@diasemi.com Add watchdog driver support for DA9062 Signed-off-by: Steve Twiss stwiss.opensou...@diasemi.com --- This patch applies against linux-next and v4.0 drivers/watchdog/Kconfig | 9 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/da9062_wdt.c | 249 ++ 3 files changed, 259 insertions(+) create mode 100644 drivers/watchdog/da9062_wdt.c diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 16f2023..62232d7 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -96,6 +96,15 @@ config DA9063_WATCHDOG This driver can be built as a module. The module name is da9063_wdt. +config DA9062_WATCHDOG + tristate Dialog DA9062 Watchdog + depends on MFD_DA9062 + select WATCHDOG_CORE + help + Support for the watchdog in the DA9062 PMIC. + + This driver can be built as a module. The module name is da9062_wdt. + config GPIO_WATCHDOG tristate Watchdog device controlled through GPIO-line depends on OF_GPIO diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 5c19294..57ba815 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -179,6 +179,7 @@ obj-$(CONFIG_XEN_WDT) += xen_wdt.o # Architecture Independent obj-$(CONFIG_DA9052_WATCHDOG) += da9052_wdt.o obj-$(CONFIG_DA9055_WATCHDOG) += da9055_wdt.o +obj-$(CONFIG_DA9062_WATCHDOG) += da9062_wdt.o obj-$(CONFIG_DA9063_WATCHDOG) += da9063_wdt.o obj-$(CONFIG_GPIO_WATCHDOG)+= gpio_wdt.o obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c new file mode 100644 index 000..ac4c255 --- /dev/null +++ b/drivers/watchdog/da9062_wdt.c @@ -0,0 +1,249 @@ +/* + * da9062_wdt.c - WDT device driver for DA9062 + * Copyright (C) 2015 Dialog Semiconductor Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/kernel.h +#include linux/module.h +#include linux/watchdog.h +#include linux/platform_device.h +#include linux/uaccess.h +#include linux/slab.h +#include linux/delay.h +#include linux/mfd/da9062/registers.h +#include linux/mfd/da9062/core.h +#include linux/regmap.h +#include linux/of.h + +static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 }; +#define DA9062_TWDSCALE_DISABLE0 +#define DA9062_TWDSCALE_MIN1 +#define DA9062_TWDSCALE_MAX(ARRAY_SIZE(wdt_timeout) - 1) +#define DA9062_WDT_MIN_TIMEOUT wdt_timeout[DA9062_TWDSCALE_MIN] +#define DA9062_WDT_MAX_TIMEOUT wdt_timeout[DA9062_TWDSCALE_MAX] +#define DA9062_WDG_DEFAULT_TIMEOUT wdt_timeout[DA9062_TWDSCALE_MAX-1] + +struct da9062_watchdog { + struct da9062 *hw; + struct watchdog_device wdtdev; +}; + +static unsigned int da9062_wdt_timeout_to_sel(unsigned int secs) +{ + unsigned int i; + + for (i = DA9062_TWDSCALE_MIN; i = DA9062_TWDSCALE_MAX; i++) { + if (wdt_timeout[i] = secs) + return i; + } + + return DA9062_TWDSCALE_MAX; +} + +static int da9062_reset_watchdog_timer(struct da9062 *hw) +{ + int ret; + + ret = regmap_update_bits(hw-regmap, + DA9062AA_CONTROL_F, + DA9062AA_WATCHDOG_MASK, + DA9062AA_WATCHDOG_MASK); + + mdelay(300); + + return ret; +} + +static int da9062_wdt_update_timeout_register(struct da9062 *chip, + unsigned int regval) +{ + int ret; + + ret = da9062_reset_watchdog_timer(chip); + if (ret) + dev_err(chip-dev, Failed to ping the watchdog (err = %d)\n, + ret); + + return regmap_update_bits(chip-regmap, + DA9062AA_CONTROL_D, + DA9062AA_TWDSCALE_MASK, + regval); +} + +static int da9062_wdt_start(struct watchdog_device *wdd) +{ + struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); + unsigned int selector; + int ret; + + selector = da9062_wdt_timeout_to_sel(wdt-wdtdev.timeout); + ret = da9062_wdt_update_timeout_register(wdt-hw, selector); + if (ret) + dev_err(wdt-hw-dev, Watchdog failed to start (err = %d)\n, + ret); + + return ret; +} + +static int da9062_wdt_stop(struct watchdog_device *wdd) +{ +
Re: [RFC/PATCH v2 3/5] devicetree: bindings: Add new cpuidle enable method for Renesas R-car SoCs
On Fri, Apr 17, 2015 at 02:11:24PM +0100, Magnus Damm wrote: Hi Mark, On Fri, Apr 17, 2015 at 9:46 PM, Mark Rutland mark.rutl...@arm.com wrote: On Thu, Apr 16, 2015 at 11:35:38AM +0100, Keita Kobayashi wrote: This patch add the ARM CPUs Device Tree binding to document a new enable method of Renesas cpuidle. Signed-off-by: Keita Kobayashi keita.kobayashi...@renesas.com --- Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 8b9e0a9..663ee11 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt @@ -196,6 +196,7 @@ nodes to be present and contain the properties described below. qcom,gcc-msm8660 qcom,kpss-acc-v1 qcom,kpss-acc-v2 + renesas,rcar-idle The enable-method is about how to bring the CPU up (and potentially implies other things, like how to take it down again). Thanks for your clarification. I now understand that this is related to SMP boot and CPU Hotplug. These is no code in this series to that effect, no semantics are provided, and the name implies this is idle-specific. So this doesn't look right, and makes no sense to me. Ok, I somehow (incorrectly?) assumed that the following line in patch 2/5* tied into this: +CPUIDLE_METHOD_OF_DECLARE(rcar, renesas,rcar-idle, rcar_cpuidle_ops); [*] [RFC/PATCH v2 2/5] ARM: shmobile: Add cpuidle_ops for R-Car cpuidle But if it is unrelated it should of course be dropped or reworked. It is related, but Mark's remark is correct. We have to keep in mind that an enable-method defines how a CPU is powered {up/down} and also suspended (quiesced through idle). It has to be defined through proper bindings and related code, adding a random compatible string for the sake of matching does not cut it, that is not acceptable and I stated it from the beginning. So, to make it clear, an enable-method defines CPU operations as a whole, cpu init, power{up/down} and suspend. It must be documented with proper bindings that defines compatible string and related properties. The sooner we incorporate the CPUidle ops into SMP ops the better to prevent this abuse from happening, an enable-method encompasses SMP ops and CPUidle ops, actually they must be merged because they represent the enable-method implementation as a whole. I hope this helps. Lorenzo -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V1 4/6] input: misc: onkey: da9062: DA9062 OnKey driver
From: S Twiss stwiss.opensou...@diasemi.com Add OnKey driver support for DA9062 Signed-off-by: Steve Twiss stwiss.opensou...@diasemi.com --- This patch applies against linux-next and v4.0 drivers/input/misc/Kconfig| 10 ++ drivers/input/misc/Makefile | 1 + drivers/input/misc/da9062-onkey.c | 223 ++ 3 files changed, 234 insertions(+) create mode 100644 drivers/input/misc/da9062-onkey.c diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 6deb8da..472ca38 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -586,6 +586,16 @@ config INPUT_DA9055_ONKEY To compile this driver as a module, choose M here: the module will be called da9055_onkey. +config INPUT_DA9062_ONKEY + tristate Dialog DA9062 OnKey + depends on MFD_DA9062 + help + Support the ONKEY of Dialog DA9062 Power Management IC as an + input device reporting power button status. + + To compile this driver as a module, choose M here: the module + will be called da9062-onkey. + config INPUT_DM355EVM tristate TI DaVinci DM355 EVM Keypad and IR Remote depends on MFD_DM355EVM_MSP diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 403a1a5..a631283 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -25,6 +25,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o +obj-$(CONFIG_INPUT_DA9062_ONKEY) += da9062-onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o obj-$(CONFIG_INPUT_E3X0_BUTTON)+= e3x0-button.o obj-$(CONFIG_INPUT_DRV260X_HAPTICS)+= drv260x.o diff --git a/drivers/input/misc/da9062-onkey.c b/drivers/input/misc/da9062-onkey.c new file mode 100644 index 000..c4c0295 --- /dev/null +++ b/drivers/input/misc/da9062-onkey.c @@ -0,0 +1,223 @@ +/* + * da9062-onkey.c - ONKEY device driver for DA9062 + * Copyright (C) 2015 Dialog Semiconductor Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/module.h +#include linux/errno.h +#include linux/input.h +#include linux/interrupt.h +#include linux/platform_device.h +#include linux/workqueue.h +#include linux/regmap.h +#include linux/of.h +#include linux/mfd/da9062/core.h +#include linux/mfd/da9062/registers.h + +struct da9062_onkey { + struct da9062 *hw; + struct delayed_work work; + struct input_dev *input; + int irq; + bool key_power; +}; + +static void da9062_poll_on(struct work_struct *work) +{ + struct da9062_onkey *onkey = container_of(work, struct da9062_onkey, + work.work); + unsigned int val; + int fault_log = 0; + bool poll = true; + int ret; + + /* poll to see when the pin is released */ + ret = regmap_read(onkey-hw-regmap, DA9062AA_STATUS_A, val); + if (ret 0) { + dev_err(onkey-input-dev, + Failed to read ON status: %d\n, ret); + goto err_poll; + } + + if (!(val DA9062AA_NONKEY_MASK)) { + ret = regmap_update_bits(onkey-hw-regmap, +DA9062AA_CONTROL_B, +DA9062AA_NONKEY_LOCK_MASK, 0); + if (ret 0) { + dev_err(onkey-input-dev, + Failed to reset the Key Delay %d\n, ret); + goto err_poll; + } + + input_report_key(onkey-input, KEY_POWER, 0); + input_sync(onkey-input); + + poll = false; + } + + /* if the fault log KEY_RESET is detected, +* then clear it and shutdown DA9062 via I2C +*/ + ret = regmap_read(onkey-hw-regmap, DA9062AA_FAULT_LOG, fault_log); + if (ret 0) + dev_warn(onkey-input-dev, Cannot read FAULT_LOG\n); + + if (fault_log DA9062AA_KEY_RESET_MASK) { + ret = regmap_write(onkey-hw-regmap, + DA9062AA_FAULT_LOG, + DA9062AA_KEY_RESET_MASK); + if (ret 0) + dev_warn(onkey-input-dev, +Cannot reset KEY_RESET
[PATCH V1 6/6] devicetree: da9062: Add bindings for DA9062 driver
From: S Twiss stwiss.opensou...@diasemi.com Add device tree bindings for the DA9062 driver Signed-off-by: Steve Twiss stwiss.opensou...@diasemi.com --- This patch applies against linux-next and v4.0 Documentation/devicetree/bindings/mfd/da9062.txt | 107 +++ 1 file changed, 107 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/da9062.txt diff --git a/Documentation/devicetree/bindings/mfd/da9062.txt b/Documentation/devicetree/bindings/mfd/da9062.txt new file mode 100644 index 000..cf8f3f6 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/da9062.txt @@ -0,0 +1,107 @@ +* Dialog DA9062 Power Management Integrated Circuit (PMIC) + +DA9062 consists of a large and varied group of sub-devices: + +Device Supply NamesDescription +-- --- +da9062-regulator: : LDOs BUCKs +da9062-onkey: : On Key +da9062-rtc : : Real-Time Clock +da9062-watchdog : : Watchdog Timer + +== + +Required properties: + +- compatible : Should be dlg,da9062. +- reg : Specifies the I2C slave address (this defaults to 0x58 but it can be + modified to match the chip's OTP settings). +- interrupt-parent : Specifies the reference to the interrupt controller for + the DA9062. +- interrupts : IRQ line information. +- interrupt-controller + +See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for +further information on IRQ bindings. + +Sub-nodes: + +- regulators : This node defines the settings for the LDOs and BUCKs. The + DA9062 regulators are bound using their names listed below: + +buck1: BUCK_1 +buck2: BUCK_2 +buck3: BUCK_3 +buck4: BUCK_4 +ldo1 : LDO_1 +ldo2 : LDO_2 +ldo3 : LDO_3 +ldo4 : LDO_4 + + The component follows the standard regulator framework and the bindings + details of individual regulator device can be found in: + Documentation/devicetree/bindings/regulator/regulator.txt + + +- rtc : This node defines settings required for the Real-Time Clock associated + with the DA9062. There are currently no entries in this binding, however + compatible = dlg,da9062-rtc should be added if a node is created. + + +- onkey : This node defines the OnKey settings for controlling the key + functionality of the device. The node should contain the compatible property + with the value dlg,da9062-onkey. + + Optional onkey properties: + + - dlg,disable-key-power : Disable power-down using a long key-press. If this +entry exists the OnKey driver will remove support for the KEY_POWER key +press. If this entry does not exist then by default the key-press +triggered power down is enabled and the OnKey will support both KEY_POWER +and KEY_SLEEP. + +- watchdog: This node defines the settings for the watchdog driver associated + with the DA9062 PMIC. The compatible = dlg,da9062-watchdog should be added + if a node is created. + + +Example: + + pmic0: da9062@58 { + compatible = dlg,da9062; + reg = 0x58; + interrupt-parent = gpio6; + interrupts = 11 IRQ_TYPE_LEVEL_LOW; + interrupt-controller; + + rtc { + compatible = dlg,da9062-rtc; + }; + + onkey { + compatible = dlg,da9062-onkey; + dlg,disable-key-power; + }; + + watchdog { + compatible = dlg,da9062-watchdog; + }; + + regulators { + DA9062_BUCK1: buck1 { + regulator-name = BUCK1; + regulator-min-microvolt = 30; + regulator-max-microvolt = 157; + regulator-min-microamp = 50; + regulator-max-microamp = 200; + regulator-boot-on; + }; + DA9062_LDO1: ldo1 { + regulator-name = LDO_1; + regulator-min-microvolt = 90; + regulator-max-microvolt = 360; + regulator-boot-on; + }; + }; + }; + -- end-of-patch for PATCH V1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] crypto: add new driver for Marvell CESA
Hi Maxime, On 17/04/2015 16:32, Maxime Ripard wrote: On Fri, Apr 17, 2015 at 04:19:22PM +0200, Boris Brezillon wrote: Hi Gregory, On Fri, 17 Apr 2015 15:01:01 +0200 Gregory CLEMENT gregory.clem...@free-electrons.com wrote: Hi Boris, On 17/04/2015 10:39, Boris Brezillon wrote: On Fri, 17 Apr 2015 10:33:56 +0200 Boris Brezillon boris.brezil...@free-electrons.com wrote: Hi Jason, On Mon, 13 Apr 2015 20:11:46 + Jason Cooper ja...@lakedaemon.net wrote: I'd appreciate if we'd look into it. I understand from on-list and off-list discussion that the rewrite was unavoidable. So I'm willing to concede that. Giving people time to migrate from old to new while still being able to update for other security fixes seems reasonable. Jason, what do you think of the approach above? I say keep it simple. We shouldn't use the DT changes to trigger one vice the other. We need to be able to build both, but only load one at a time. If that's anything other than simple to do, then we make it a Kconfig binary choice and move on. Actually I was planning to handle it with a Kconfig dependency rule (NEW_DRIVER depends on !OLD_DRIVER and OLD_DRIVER depends on !NEW_DRIVER). I don't know how to make it a runtime check without adding new compatible strings for the kirkwood, dove and orion platforms, and I'm sure sure this is a good idea. ^ not Do you have any ideas ? You use devm_ioremap_resource() in the new driver, so if the old one is already loaded the memory region will be already hold and the new driver will simply fail during the probe. So for this part it is OK. I like the idea :-). Not really, how do you know which device is going to be probed? For that matter, it's pretty much random, and you have no control over it. Why not just have a choice option, and select which one you want to enable? Because you can't prevent an user to build a module, then modifying the configuration and building the other module. So even if there is a choice at build time, and I think that it is something expected for the v2, we still need preventing having the both drivers trying accessing the same hardware in the same time. Thanks, Gregory Maxime -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V1 3/6] rtc: da9062: DA9062 RTC driver
From: S Twiss stwiss.opensou...@diasemi.com Add RTC driver support for DA9062 Signed-off-by: Steve Twiss stwiss.opensou...@diasemi.com --- This patch applies against linux-next and v4.0 drivers/rtc/Kconfig | 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-da9062.c | 367 +++ 3 files changed, 378 insertions(+) create mode 100644 drivers/rtc/rtc-da9062.c diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index b5b5c3d..c4d21bd 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -927,6 +927,16 @@ config RTC_DRV_DA9055 This driver can also be built as a module. If so, the module will be called rtc-da9055 +config RTC_DRV_DA9062 + tristate Dialog Semiconductor DA9062 RTC + depends on MFD_DA9062 + help + If you say yes here you will get support for the RTC subsystem + of the Dialog Semiconductor DA9062. + + This driver can also be built as a module. If so, the module + will be called rtc-da9062. + config RTC_DRV_DA9063 tristate Dialog Semiconductor DA9063 RTC depends on MFD_DA9063 diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 69c8706..9108e62 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -38,6 +38,7 @@ obj-$(CONFIG_RTC_DRV_CMOS)+= rtc-cmos.o obj-$(CONFIG_RTC_DRV_COH901331)+= rtc-coh901331.o obj-$(CONFIG_RTC_DRV_DA9052) += rtc-da9052.o obj-$(CONFIG_RTC_DRV_DA9055) += rtc-da9055.o +obj-$(CONFIG_RTC_DRV_DA9062) += rtc-da9062.o obj-$(CONFIG_RTC_DRV_DA9063) += rtc-da9063.o obj-$(CONFIG_RTC_DRV_DAVINCI) += rtc-davinci.o obj-$(CONFIG_RTC_DRV_DM355EVM) += rtc-dm355evm.o diff --git a/drivers/rtc/rtc-da9062.c b/drivers/rtc/rtc-da9062.c new file mode 100644 index 000..0f3d646 --- /dev/null +++ b/drivers/rtc/rtc-da9062.c @@ -0,0 +1,367 @@ +/* + * rtc-da9062.c - RTC device driver for DA9062 + * Copyright (C) 2015 Dialog Semiconductor Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/kernel.h +#include linux/module.h +#include linux/init.h +#include linux/platform_device.h +#include linux/interrupt.h +#include linux/rtc.h +#include linux/slab.h +#include linux/delay.h +#include linux/regmap.h +#include linux/mfd/da9062/registers.h +#include linux/mfd/da9062/core.h + +#define DA9062_GET_TIME_RETRIES5 + +#define YEARS_TO_DA9062(year) ((year) - 100) +#define MONTHS_TO_DA9062(month)((month) + 1) +#define YEARS_FROM_DA9062(year)((year) + 100) +#define MONTHS_FROM_DA9062(month) ((month) - 1) + +#define RTC_DATA_LEN (DA9062AA_COUNT_Y - DA9062AA_COUNT_S + 1) +enum { + RTC_SEC = 0, + RTC_MIN = 1, + RTC_HOUR = 2, + RTC_DAY = 3, + RTC_MONTH = 4, + RTC_YEAR = 5, +}; + +#define DA9062AA_ALARM_STATUS_ENUM_TIMER (0x02 6) + +struct da9062_rtc { + struct rtc_device *rtc_dev; + struct da9062 *hw; + struct rtc_time alarm_time; + bool rtc_sync; +}; + +static void da9062_data_to_tm(u8 *data, struct rtc_time *tm) +{ + tm-tm_sec = data[RTC_SEC] DA9062AA_COUNT_SEC_MASK; + tm-tm_min = data[RTC_MIN] DA9062AA_COUNT_MIN_MASK; + tm-tm_hour = data[RTC_HOUR] DA9062AA_COUNT_HOUR_MASK; + tm-tm_mday = data[RTC_DAY] DA9062AA_COUNT_DAY_MASK; + tm-tm_mon = MONTHS_FROM_DA9062(data[RTC_MONTH] +DA9062AA_COUNT_MONTH_MASK); + tm-tm_year = YEARS_FROM_DA9062(data[RTC_YEAR] + DA9062AA_COUNT_YEAR_MASK); +} + +static void da9062_tm_to_data(struct rtc_time *tm, u8 *data) +{ + data[RTC_SEC] = ~DA9062AA_COUNT_SEC_MASK; + data[RTC_SEC] |= tm-tm_sec DA9062AA_COUNT_SEC_MASK; + + data[RTC_MIN] = ~DA9062AA_COUNT_MIN_MASK; + data[RTC_MIN] |= tm-tm_min DA9062AA_COUNT_MIN_MASK; + + data[RTC_HOUR] = ~DA9062AA_COUNT_HOUR_MASK; + data[RTC_HOUR] |= tm-tm_hour DA9062AA_COUNT_HOUR_MASK; + + data[RTC_DAY] = ~DA9062AA_COUNT_DAY_MASK; + data[RTC_DAY] |= tm-tm_mday DA9062AA_COUNT_DAY_MASK; + + data[RTC_MONTH] = ~DA9062AA_COUNT_MONTH_MASK; + data[RTC_MONTH] |= MONTHS_TO_DA9062(tm-tm_mon) + DA9062AA_COUNT_MONTH_MASK; + + data[RTC_YEAR] = ~DA9062AA_COUNT_YEAR_MASK; + data[RTC_YEAR] |= YEARS_TO_DA9062(tm-tm_year) + DA9062AA_COUNT_YEAR_MASK; +} + +static int da9062_rtc_stop_alarm(struct device *dev) +{ +
Re: [PATCH 0/2] crypto: add new driver for Marvell CESA
On Fri, Apr 17, 2015 at 04:19:22PM +0200, Boris Brezillon wrote: Hi Gregory, On Fri, 17 Apr 2015 15:01:01 +0200 Gregory CLEMENT gregory.clem...@free-electrons.com wrote: Hi Boris, On 17/04/2015 10:39, Boris Brezillon wrote: On Fri, 17 Apr 2015 10:33:56 +0200 Boris Brezillon boris.brezil...@free-electrons.com wrote: Hi Jason, On Mon, 13 Apr 2015 20:11:46 + Jason Cooper ja...@lakedaemon.net wrote: I'd appreciate if we'd look into it. I understand from on-list and off-list discussion that the rewrite was unavoidable. So I'm willing to concede that. Giving people time to migrate from old to new while still being able to update for other security fixes seems reasonable. Jason, what do you think of the approach above? I say keep it simple. We shouldn't use the DT changes to trigger one vice the other. We need to be able to build both, but only load one at a time. If that's anything other than simple to do, then we make it a Kconfig binary choice and move on. Actually I was planning to handle it with a Kconfig dependency rule (NEW_DRIVER depends on !OLD_DRIVER and OLD_DRIVER depends on !NEW_DRIVER). I don't know how to make it a runtime check without adding new compatible strings for the kirkwood, dove and orion platforms, and I'm sure sure this is a good idea. ^ not Do you have any ideas ? You use devm_ioremap_resource() in the new driver, so if the old one is already loaded the memory region will be already hold and the new driver will simply fail during the probe. So for this part it is OK. I like the idea :-). Not really, how do you know which device is going to be probed? For that matter, it's pretty much random, and you have no control over it. Why not just have a choice option, and select which one you want to enable? Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com signature.asc Description: Digital signature
[PATCH v3 00/17] crypto: talitos - Add support for SEC1
The purpose of this set of patchs is to add to talitos crypto driver the support for the SEC1 version of the security engine, which is found in mpc885 and mpc8272 processors. v3 is a complete rework of the patchset. Since a kernel can be built with support for both MPC82xx and MPC83xx at the same time, talitos driver shall support both SEC1 and SEC2+ at the same time. Based on cryptodev-2.6 tree Christophe Leroy (17): crypto: talitos - Use zero entry to init descriptors ptrs to zero crypto: talitos - Refactor the sg in/out chain allocation crypto: talitos - talitos_ptr renamed ptr for more lisibility crypto: talitos - Add a helper function to clear j_extent field crypto: talitos - remove param 'extent' in map_single_talitos_ptr() crypto: talitos - helper function for ptr len crypto: talitos - enhanced talitos_desc struct for SEC1 crypto: talitos - add sub-choice in talitos CONFIG for SEC1 crypto: talitos - Add a feature to tag SEC1 crypto: talitos - fill in talitos descriptor iaw SEC1 or SEC2+ crypto: talitos - adaptation of talitos_submit() for SEC1 crypto: talitos - base address for Execution Units crypto: talitos - adapt interrupts and reset functions to SEC1 crypto: talitos - implement scatter/gather copy for SEC1 crypto: talitos - SEC1 bugs on 0 data hash crypto: talitos - Add fsl,sec1.0 compatible crypto: talitos - Update DT bindings with SEC1 .../devicetree/bindings/crypto/fsl-sec2.txt| 6 +- drivers/crypto/Kconfig | 18 + drivers/crypto/talitos.c | 727 +++-- drivers/crypto/talitos.h | 153 +++-- 4 files changed, 644 insertions(+), 260 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 09/11] ARM: dts: exynos4: Use labels for overriding nodes in Odroid
Usage of lablels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 728 arch/arm/boot/dts/exynos4412-odroidx.dts| 16 +- 2 files changed, 372 insertions(+), 372 deletions(-) diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index 8de12af7c276..6801ee6c4449 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi @@ -37,16 +37,6 @@ }; }; - i2s0: i2s@0383 { - pinctrl-0 = i2s0_bus; - pinctrl-names = default; - status = okay; - clocks = clock_audss EXYNOS_I2S_BUS, -clock_audss EXYNOS_DOUT_AUD_BUS, -clock_audss EXYNOS_SCLK_I2S; - clock-names = iis, i2s_opclk0, i2s_opclk1; - }; - sound: sound { compatible = simple-audio-card; assigned-clocks = clock_audss EXYNOS_MOUT_AUDSS, @@ -82,425 +72,435 @@ reset-gpios = gpk1 2 1; }; - mmc@1255 { - pinctrl-0 = sd4_clk sd4_cmd sd4_bus4 sd4_bus8; - pinctrl-names = default; - vmmc-supply = ldo20_reg buck8_reg; - mmc-pwrseq = emmc_pwrseq; - status = okay; - - num-slots = 1; - broken-cd; - card-detect-delay = 200; - samsung,dw-mshc-ciu-div = 3; - samsung,dw-mshc-sdr-timing = 2 3; - samsung,dw-mshc-ddr-timing = 1 2; - bus-width = 8; - cap-mmc-highspeed; - }; - - watchdog@1006 { - status = okay; - }; - - rtc@1007 { - status = okay; - }; - - g2d@1080 { - status = okay; - }; - camera { status = okay; pinctrl-names = default; pinctrl-0 = ; + }; - fimc_0: fimc@1180 { - status = okay; - assigned-clocks = clock CLK_MOUT_FIMC0, - clock CLK_SCLK_FIMC0; - assigned-clock-parents = clock CLK_MOUT_MPLL_USER_T; - assigned-clock-rates = 0, 17600; - }; - - fimc_1: fimc@1181 { - status = okay; - assigned-clocks = clock CLK_MOUT_FIMC1, - clock CLK_SCLK_FIMC1; - assigned-clock-parents = clock CLK_MOUT_MPLL_USER_T; - assigned-clock-rates = 0, 17600; + fixed-rate-clocks { + xxti { + compatible = samsung,clock-xxti; + clock-frequency = 0; }; - fimc_2: fimc@1182 { - status = okay; - assigned-clocks = clock CLK_MOUT_FIMC2, - clock CLK_SCLK_FIMC2; - assigned-clock-parents = clock CLK_MOUT_MPLL_USER_T; - assigned-clock-rates = 0, 17600; + xusbxti { + compatible = samsung,clock-xusbxti; + clock-frequency = 2400; }; + }; - fimc_3: fimc@1183 { - status = okay; - assigned-clocks = clock CLK_MOUT_FIMC3, - clock CLK_SCLK_FIMC3; - assigned-clock-parents = clock CLK_MOUT_MPLL_USER_T; - assigned-clock-rates = 0, 17600; + thermal-zones { + cpu_thermal: cpu-thermal { + cooling-maps { + map0 { +/* Corresponds to 800MHz at freq_table */ +cooling-device = cpu0 7 7; + }; + map1 { +/* Corresponds to 200MHz at freq_table */ +cooling-device = cpu0 13 13; + }; + }; }; }; +}; - sdhci@1253 { - bus-width = 4; - pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus4; - pinctrl-names = default; - vmmc-supply = ldo4_reg ldo21_reg; - cd-gpios = gpk2 2 0; - cd-inverted; - status = okay; - }; +/* RSTN signal for eMMC */ +sd1_cd { + samsung,pin-pud = 0; + samsung,pin-drv = 0; +}; - serial@1380 { - status = okay; +pinctrl_1 { +
[PATCHv2 02/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4210
Usage of lablels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4210.dtsi | 43 +++ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 76b84852f29c..a9a55304e31a 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -52,16 +52,6 @@ }; }; - pmu_system_controller: system-controller@1002 { - clock-names = clkout0, clkout1, clkout2, clkout3, - clkout4, clkout8, clkout9; - clocks = clock CLK_OUT_DMC, clock CLK_OUT_TOP, - clock CLK_OUT_LEFTBUS, clock CLK_OUT_RIGHTBUS, - clock CLK_OUT_CPU, clock CLK_XXTI, - clock CLK_XUSBXTI; - #clock-cells = 1; - }; - sysram: sysram@0202 { compatible = mmio-sram; reg = 0x0202 0x2; @@ -95,18 +85,6 @@ arm,data-latency = 2 2 1; }; - gic: interrupt-controller@1049 { - cpu-offset = 0x8000; - }; - - combiner: interrupt-controller@1044 { - samsung,combiner-nr = 16; - interrupts = 0 0 0, 0 1 0, 0 2 0, 0 3 0, -0 4 0, 0 5 0, 0 6 0, 0 7 0, -0 8 0, 0 9 0, 0 10 0, 0 11 0, -0 12 0, 0 13 0, 0 14 0, 0 15 0; - }; - mct: mct@1005 { compatible = samsung,exynos4210-mct; reg = 0x1005 0x800; @@ -245,3 +223,24 @@ status = disabled; }; }; + +gic { + cpu-offset = 0x8000; +}; + +combiner { + samsung,combiner-nr = 16; + interrupts = 0 0 0, 0 1 0, 0 2 0, 0 3 0, +0 4 0, 0 5 0, 0 6 0, 0 7 0, +0 8 0, 0 9 0, 0 10 0, 0 11 0, +0 12 0, 0 13 0, 0 14 0, 0 15 0; +}; + +pmu_system_controller { + clock-names = clkout0, clkout1, clkout2, clkout3, + clkout4, clkout8, clkout9; + clocks = clock CLK_OUT_DMC, clock CLK_OUT_TOP, + clock CLK_OUT_LEFTBUS, clock CLK_OUT_RIGHTBUS, + clock CLK_OUT_CPU, clock CLK_XXTI, clock CLK_XUSBXTI; + #clock-cells = 1; +}; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 00/11] ARM: dts: exynos4: labels for overriding nodes
Hi, Changes since v1 1. Re-phrased the description (phandle-label). Suggested by Arnd. Description === The label-based notation reduces possible mistakes when overriding nodes by child DTSI and board files and reduces duplication of addresses. The patchset refactors Exynos4 boards to use labels for overriding nodes. Tested by comparison of decompiled DTB for each commit. Best regards, Krzysztof Krzysztof Kozlowski (11): ARM: dts: Add labels to Exynos4 nodes ARM: dts: exynos4: Use labels for overriding nodes in Exynos4210 ARM: dts: exynos4: Use labels for overriding nodes in Exynos4210 Origen ARM: dts: exynos4: Use labels for overriding nodes in SMDKv310 ARM: dts: exynos4: Use labels for overriding nodes in Trats ARM: dts: exynos4: Use labels for overriding nodes in Exynos4212 ARM: dts: exynos4: Use labels for overriding nodes in Exynos4x12 ARM: dts: exynos4: Use labels for overriding nodes in Exynos4412 ARM: dts: exynos4: Use labels for overriding nodes in Odroid ARM: dts: exynos4: Use labels for overriding nodes in SMDK4412 ARM: dts: exynos4: Use labels for overriding nodes in Trats2 arch/arm/boot/dts/exynos4.dtsi | 22 +- arch/arm/boot/dts/exynos4210-origen.dts | 418 +++ arch/arm/boot/dts/exynos4210-pinctrl.dtsi |6 +- arch/arm/boot/dts/exynos4210-smdkv310.dts | 280 ++--- arch/arm/boot/dts/exynos4210-trats.dts | 592 +- arch/arm/boot/dts/exynos4210.dtsi | 49 +- arch/arm/boot/dts/exynos4212.dtsi | 12 +- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 728 ++--- arch/arm/boot/dts/exynos4412-odroidx.dts| 16 +- arch/arm/boot/dts/exynos4412-smdk4412.dts | 210 ++-- arch/arm/boot/dts/exynos4412-trats2.dts | 1331 --- arch/arm/boot/dts/exynos4412.dtsi | 20 +- arch/arm/boot/dts/exynos4x12-pinctrl.dtsi |8 +- arch/arm/boot/dts/exynos4x12.dtsi | 212 ++-- 14 files changed, 1952 insertions(+), 1952 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/7] ARM: dts: Add labels to Exynos5 nodes
Add new labels to certain nodes so they could be easily referenced by Exynos5 board DTS files. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos5.dtsi| 6 +++--- arch/arm/boot/dts/exynos5440.dtsi | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi index 056251599c69..e0f00bde7b14 100644 --- a/arch/arm/boot/dts/exynos5.dtsi +++ b/arch/arm/boot/dts/exynos5.dtsi @@ -81,14 +81,14 @@ interrupts = 0 54 0; }; - rtc@101E { + rtc: rtc@101E { compatible = samsung,s3c6410-rtc; reg = 0x101E 0x100; interrupts = 0 43 0, 0 44 0; status = disabled; }; - fimd@1440 { + fimd: fimd@1440 { compatible = samsung,exynos5250-fimd; interrupt-parent = combiner; reg = 0x1440 0x4; @@ -98,7 +98,7 @@ status = disabled; }; - dp-controller@145B { + dp: dp-controller@145B { compatible = samsung,exynos5-dp; reg = 0x145B 0x1000; interrupts = 10 3; diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi index 59d9416b3b03..f18b51f2eeaa 100644 --- a/arch/arm/boot/dts/exynos5440.dtsi +++ b/arch/arm/boot/dts/exynos5440.dtsi @@ -279,7 +279,7 @@ clock-names = usbhost; }; - pcie@29 { + pcie_0: pcie@29 { compatible = samsung,exynos5440-pcie, snps,dw-pcie; reg = 0x29 0x1000 0x27 0x1000 @@ -300,7 +300,7 @@ status = disabled; }; - pcie@2a { + pcie_1: pcie@2a { compatible = samsung,exynos5440-pcie, snps,dw-pcie; reg = 0x2a 0x1000 0x272000 0x1000 -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 4/7] ARM: dts: exynos5: Use labels for overriding nodes in Arndale Octa
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos5420-arndale-octa.dts | 634 +- 1 file changed, 317 insertions(+), 317 deletions(-) diff --git a/arch/arm/boot/dts/exynos5420-arndale-octa.dts b/arch/arm/boot/dts/exynos5420-arndale-octa.dts index 97346df31d41..7eb0e6b703bf 100644 --- a/arch/arm/boot/dts/exynos5420-arndale-octa.dts +++ b/arch/arm/boot/dts/exynos5420-arndale-octa.dts @@ -39,323 +39,6 @@ }; }; - codec@1100 { - samsung,mfc-r = 0x4300 0x80; - samsung,mfc-l = 0x5100 0x80; - }; - - mmc@1220 { - status = okay; - broken-cd; - card-detect-delay = 200; - samsung,dw-mshc-ciu-div = 3; - samsung,dw-mshc-sdr-timing = 0 4; - samsung,dw-mshc-ddr-timing = 0 2; - pinctrl-names = default; - pinctrl-0 = sd0_clk sd0_cmd sd0_bus1 sd0_bus4 sd0_bus8; - vmmc-supply = ldo10_reg; - bus-width = 8; - cap-mmc-highspeed; - }; - - mmc@1222 { - status = okay; - card-detect-delay = 200; - samsung,dw-mshc-ciu-div = 3; - samsung,dw-mshc-sdr-timing = 2 3; - samsung,dw-mshc-ddr-timing = 1 2; - pinctrl-names = default; - pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus1 sd2_bus4; - vmmc-supply = ldo19_reg; - vqmmc-supply = ldo13_reg; - bus-width = 4; - cap-sd-highspeed; - }; - - hsi2c_4: i2c@12CA { - status = okay; - - s2mps11_pmic@66 { - compatible = samsung,s2mps11-pmic; - reg = 0x66; - s2mps11,buck2-ramp-delay = 12; - s2mps11,buck34-ramp-delay = 12; - s2mps11,buck16-ramp-delay = 12; - s2mps11,buck6-ramp-enable = 1; - s2mps11,buck2-ramp-enable = 1; - s2mps11,buck3-ramp-enable = 1; - s2mps11,buck4-ramp-enable = 1; - - interrupt-parent = gpx3; - interrupts = 2 IRQ_TYPE_EDGE_FALLING; - pinctrl-names = default; - pinctrl-0 = s2mps11_irq; - - s2mps11_osc: clocks { - #clock-cells = 1; - clock-output-names = s2mps11_ap, - s2mps11_cp, s2mps11_bt; - }; - - regulators { - ldo1_reg: LDO1 { - regulator-name = PVDD_ALIVE_1V0; - regulator-min-microvolt = 100; - regulator-max-microvolt = 100; - regulator-always-on; - }; - - ldo2_reg: LDO2 { - regulator-name = PVDD_APIO_1V8; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - }; - - ldo3_reg: LDO3 { - regulator-name = PVDD_APIO_MMCON_1V8; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - regulator-always-on; - }; - - ldo4_reg: LDO4 { - regulator-name = PVDD_ADC_1V8; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - }; - - ldo5_reg: LDO5 { - regulator-name = PVDD_PLL_1V8; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - regulator-always-on; - }; - - ldo6_reg: LDO6 { - regulator-name = PVDD_ANAIP_1V0; - regulator-min-microvolt = 100; - regulator-max-microvolt = 100; - }; - - ldo7_reg: LDO7 { - regulator-name = PVDD_ANAIP_1V8; -
[PATCH v2 3/7] ARM: dts: exynos5: Remove duplicated I2C7 nodes in Snow
The i2c_7 node (i2c@12CD) with LVDS bridge child node was put in Exynos5250 Snow DTS file twice. Move the LVDS bridge to proper existing i2c_7 node. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos5250-snow.dts | 46 +-- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts index 2657e842e5a5..7ecdad0517e7 100644 --- a/arch/arm/boot/dts/exynos5250-snow.dts +++ b/arch/arm/boot/dts/exynos5250-snow.dts @@ -177,30 +177,6 @@ }; }; - i2c@12CD { - ptn3460: lvds-bridge@20 { - compatible = nxp,ptn3460; - reg = 0x20; - powerdown-gpios = gpy2 5 GPIO_ACTIVE_HIGH; - reset-gpios = gpx1 5 GPIO_ACTIVE_HIGH; - edid-emulation = 5; - - ports { - port@0 { - bridge_out: endpoint { - remote-endpoint = panel_in; - }; - }; - - port@1 { - bridge_in: endpoint { - remote-endpoint = dp_out; - }; - }; - }; - }; - }; - sound { compatible = google,snow-audio-max98095; @@ -507,6 +483,28 @@ samsung,i2c-sda-delay = 100; samsung,i2c-max-bus-freq = 66000; + ptn3460: lvds-bridge@20 { + compatible = nxp,ptn3460; + reg = 0x20; + powerdown-gpios = gpy2 5 GPIO_ACTIVE_HIGH; + reset-gpios = gpx1 5 GPIO_ACTIVE_HIGH; + edid-emulation = 5; + + ports { + port@0 { + bridge_out: endpoint { + remote-endpoint = panel_in; + }; + }; + + port@1 { + bridge_in: endpoint { + remote-endpoint = dp_out; + }; + }; + }; + }; + max98095: codec@11 { compatible = maxim,max98095; reg = 0x11; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 7/7] ARM: dts: exynos5: Use labels for overriding nodes in Exynos5440 boards
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos5440-sd5v1.dts| 10 ++-- arch/arm/boot/dts/exynos5440-ssdk5440.dts | 85 +++ 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/arch/arm/boot/dts/exynos5440-sd5v1.dts b/arch/arm/boot/dts/exynos5440-sd5v1.dts index 268609a42b2c..a98501bab6fc 100644 --- a/arch/arm/boot/dts/exynos5440-sd5v1.dts +++ b/arch/arm/boot/dts/exynos5440-sd5v1.dts @@ -27,13 +27,13 @@ }; }; - gmac: ethernet@0023 { - fixed_phy; - phy_addr = 1; - }; - spi { status = disabled; }; }; + +gmac { + fixed_phy; + phy_addr = 1; +}; diff --git a/arch/arm/boot/dts/exynos5440-ssdk5440.dts b/arch/arm/boot/dts/exynos5440-ssdk5440.dts index ff55dac6e219..e4443f4e6572 100644 --- a/arch/arm/boot/dts/exynos5440-ssdk5440.dts +++ b/arch/arm/boot/dts/exynos5440-ssdk5440.dts @@ -20,59 +20,58 @@ bootargs = root=/dev/sda2 rw rootwait ignore_loglevel earlyprintk no_console_suspend mem=2048M@0x8000 mem=6144M@0x1 console=ttySAC0,115200; }; - spi_0: spi@D { - - flash: w25q128@0 { - #address-cells = 1; - #size-cells = 1; - compatible = winbond,w25q128; - spi-max-frequency = 15625000; - reg = 0; - controller-data { - samsung,spi-feedback-delay = 0; - }; + fixed-rate-clocks { + xtal { + compatible = samsung,clock-xtal; + clock-frequency = 5000; + }; + }; +}; - partition@0 { - label = BootLoader; - reg = 0x6 0x8; - read-only; - }; +pcie_0 { + reset-gpio = pin_ctrl 5 0; + status = okay; +}; - partition@e { - label = Recovery-Kernel; - reg = 0xe 0x30; - read-only; - }; +pcie_1 { + reset-gpio = pin_ctrl 22 0; + status = okay; +}; - partition@3e { - label = CRAM-FS; - reg = 0x3e 0x70; - read-only; - }; +spi_0 { + flash: w25q128@0 { + #address-cells = 1; + #size-cells = 1; + compatible = winbond,w25q128; + spi-max-frequency = 15625000; + reg = 0; + controller-data { + samsung,spi-feedback-delay = 0; + }; - partition@ae { - label = User-Data; - reg = 0xae 0x52; - }; + partition@0 { + label = BootLoader; + reg = 0x6 0x8; + read-only; + }; + partition@e { + label = Recovery-Kernel; + reg = 0xe 0x30; + read-only; }; - }; + partition@3e { + label = CRAM-FS; + reg = 0x3e 0x70; + read-only; + }; - fixed-rate-clocks { - xtal { - compatible = samsung,clock-xtal; - clock-frequency = 5000; + partition@ae { + label = User-Data; + reg = 0xae 0x52; }; - }; - pcie@29 { - reset-gpio = pin_ctrl 5 0; - status = okay; }; - pcie@2a { - reset-gpio = pin_ctrl 22 0; - status = okay; - }; }; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 2/7] ARM: dts: exynos5: Use labels for overriding nodes in Exynos5250
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos5250.dtsi | 82 +++ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 257e2f10525d..916871bb3f05 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -241,13 +241,6 @@ clock-names = mfc; }; - rtc: rtc@101E { - clocks = clock CLK_RTC; - clock-names = rtc; - interrupt-parent = pmu_system_controller; - status = disabled; - }; - tmu: tmu@1006 { compatible = samsung,exynos5250-tmu; reg = 0x1006 0x100; @@ -276,26 +269,6 @@ }; }; - serial@12C0 { - clocks = clock CLK_UART0, clock CLK_SCLK_UART0; - clock-names = uart, clk_uart_baud0; - }; - - serial@12C1 { - clocks = clock CLK_UART1, clock CLK_SCLK_UART1; - clock-names = uart, clk_uart_baud0; - }; - - serial@12C2 { - clocks = clock CLK_UART2, clock CLK_SCLK_UART2; - clock-names = uart, clk_uart_baud0; - }; - - serial@12C3 { - clocks = clock CLK_UART3, clock CLK_SCLK_UART3; - clock-names = uart, clk_uart_baud0; - }; - sata: sata@122F { compatible = snps,dwc-ahci; samsung,sata-freq = 66; @@ -778,20 +751,6 @@ #phy-cells = 0; }; - dp: dp-controller@145B { - power-domains = pd_disp1; - clocks = clock CLK_DP; - clock-names = dp; - phys = dp_phy; - phy-names = dp; - }; - - fimd: fimd@1440 { - power-domains = pd_disp1; - clocks = clock CLK_SCLK_FIMD1, clock CLK_FIMD1; - clock-names = sclk_fimd, fimd; - }; - adc: adc@12D1 { compatible = samsung,exynos-adc-v1; reg = 0x12D1 0x100; @@ -812,3 +771,44 @@ clock-names = secss; }; }; + +dp { + power-domains = pd_disp1; + clocks = clock CLK_DP; + clock-names = dp; + phys = dp_phy; + phy-names = dp; +}; + +fimd { + power-domains = pd_disp1; + clocks = clock CLK_SCLK_FIMD1, clock CLK_FIMD1; + clock-names = sclk_fimd, fimd; +}; + +rtc { + clocks = clock CLK_RTC; + clock-names = rtc; + interrupt-parent = pmu_system_controller; + status = disabled; +}; + +serial_0 { + clocks = clock CLK_UART0, clock CLK_SCLK_UART0; + clock-names = uart, clk_uart_baud0; +}; + +serial_1 { + clocks = clock CLK_UART1, clock CLK_SCLK_UART1; + clock-names = uart, clk_uart_baud0; +}; + +serial_2 { + clocks = clock CLK_UART2, clock CLK_SCLK_UART2; + clock-names = uart, clk_uart_baud0; +}; + +serial_3 { + clocks = clock CLK_UART3, clock CLK_SCLK_UART3; + clock-names = uart, clk_uart_baud0; +}; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 6/7] ARM: dts: exynos5: Use labels for overriding nodes in SMDK5420
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos5420-smdk5420.dts | 645 +++--- 1 file changed, 323 insertions(+), 322 deletions(-) diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts b/arch/arm/boot/dts/exynos5420-smdk5420.dts index 9103f2381a6d..98871f972c8a 100644 --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts @@ -64,105 +64,6 @@ }; }; - rtc@101E { - status = okay; - }; - - codec@1100 { - samsung,mfc-r = 0x4300 0x80; - samsung,mfc-l = 0x5100 0x80; - }; - - mmc@1220 { - status = okay; - broken-cd; - card-detect-delay = 200; - samsung,dw-mshc-ciu-div = 3; - samsung,dw-mshc-sdr-timing = 0 4; - samsung,dw-mshc-ddr-timing = 0 2; - samsung,dw-mshc-hs400-timing = 0 2; - samsung,read-strobe-delay = 90; - pinctrl-names = default; - pinctrl-0 = sd0_clk sd0_cmd sd0_bus1 sd0_bus4 sd0_bus8 -sd0_rclk; - bus-width = 8; - cap-mmc-highspeed; - }; - - mmc@1222 { - status = okay; - card-detect-delay = 200; - samsung,dw-mshc-ciu-div = 3; - samsung,dw-mshc-sdr-timing = 2 3; - samsung,dw-mshc-ddr-timing = 1 2; - pinctrl-names = default; - pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus1 sd2_bus4; - bus-width = 4; - cap-sd-highspeed; - }; - - dp-controller@145B { - pinctrl-names = default; - pinctrl-0 = dp_hpd; - samsung,color-space = 0; - samsung,dynamic-range = 0; - samsung,ycbcr-coeff = 0; - samsung,color-depth = 1; - samsung,link-rate = 0x0a; - samsung,lane-count = 4; - status = okay; - }; - - fimd@1440 { - status = okay; - display-timings { - native-mode = timing0; - timing0: timing@0 { - clock-frequency = 5; - hactive = 2560; - vactive = 1600; - hfront-porch = 48; - hback-porch = 80; - hsync-len = 32; - vback-porch = 16; - vfront-porch = 8; - vsync-len = 6; - }; - }; - }; - - pinctrl@1340 { - hdmi_hpd_irq: hdmi-hpd-irq { - samsung,pins = gpx3-7; - samsung,pin-function = 0; - samsung,pin-pud = 1; - samsung,pin-drv = 0; - }; - }; - - pinctrl@1400 { - usb300_vbus_en: usb300-vbus-en { - samsung,pins = gpg0-5; - samsung,pin-function = 1; - samsung,pin-pud = 0; - samsung,pin-drv = 0; - }; - - usb301_vbus_en: usb301-vbus-en { - samsung,pins = gpg1-4; - samsung,pin-function = 1; - samsung,pin-pud = 0; - samsung,pin-drv = 0; - }; - }; - - hdmi@1453 { - status = okay; - hpd-gpio = gpx3 7 0; - pinctrl-names = default; - pinctrl-0 = hdmi_hpd_irq; - }; - usb300_vbus_reg: regulator-usb300 { compatible = regulator-fixed; regulator-name = VBUS0; @@ -185,238 +86,338 @@ enable-active-high; }; - phy@1210 { - vbus-supply = usb300_vbus_reg; - }; +}; - phy@1250 { - vbus-supply = usb301_vbus_reg; +dp { + pinctrl-names = default; + pinctrl-0 = dp_hpd; + samsung,color-space = 0; + samsung,dynamic-range = 0; + samsung,ycbcr-coeff = 0; + samsung,color-depth = 1; + samsung,link-rate = 0x0a; + samsung,lane-count = 4; + status = okay; +}; + +fimd { + status = okay; + display-timings { + native-mode = timing0; + timing0: timing@0 { + clock-frequency = 5; + hactive = 2560; + vactive = 1600; + hfront-porch = 48; + hback-porch = 80; + hsync-len = 32; +
[PATCHv2 05/11] ARM: dts: exynos4: Use labels for overriding nodes in Trats
Usage of lablels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4210-trats.dts | 592 - 1 file changed, 296 insertions(+), 296 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts index 32c5fd8f6269..98f3ce65cb9a 100644 --- a/arch/arm/boot/dts/exynos4210-trats.dts +++ b/arch/arm/boot/dts/exynos4210-trats.dts @@ -89,42 +89,6 @@ }; }; - hsotg@1248 { - vusb_d-supply = vusb_reg; - vusb_a-supply = vusbdac_reg; - dr_mode = peripheral; - status = okay; - }; - - sdhci_emmc: sdhci@1251 { - bus-width = 8; - non-removable; - pinctrl-0 = sd0_clk sd0_cmd sd0_bus8; - pinctrl-names = default; - vmmc-supply = vemmc_reg; - status = okay; - }; - - exynos-usbphy@125B { - status = okay; - }; - - serial@1380 { - status = okay; - }; - - serial@1381 { - status = okay; - }; - - serial@1382 { - status = okay; - }; - - serial@1383 { - status = okay; - }; - gpio-keys { compatible = gpio-keys; @@ -158,201 +122,6 @@ }; }; - i2c@1389 { - samsung,i2c-sda-delay = 100; - samsung,i2c-slave-addr = 0x10; - samsung,i2c-max-bus-freq = 40; - pinctrl-0 = i2c3_bus; - pinctrl-names = default; - status = okay; - - mms114-touchscreen@48 { - compatible = melfas,mms114; - reg = 0x48; - interrupt-parent = gpx0; - interrupts = 4 2; - x-size = 720; - y-size = 1280; - avdd-supply = tsp_reg; - vdd-supply = tsp_reg; - }; - }; - - i2c@138B { - samsung,i2c-sda-delay = 100; - samsung,i2c-slave-addr = 0x10; - samsung,i2c-max-bus-freq = 10; - pinctrl-0 = i2c5_bus; - pinctrl-names = default; - status = okay; - - max8997_pmic@66 { - compatible = maxim,max8997-pmic; - - reg = 0x66; - - max8997,pmic-buck1-uses-gpio-dvs; - max8997,pmic-buck2-uses-gpio-dvs; - max8997,pmic-buck5-uses-gpio-dvs; - - max8997,pmic-ignore-gpiodvs-side-effect; - max8997,pmic-buck125-default-dvs-idx = 0; - - max8997,pmic-buck125-dvs-gpios = gpx0 5 0, -gpx0 6 0, -gpl0 0 0; - - max8997,pmic-buck1-dvs-voltage = 135, 130, -125, 120, -115, 110, -100, 95; - - max8997,pmic-buck2-dvs-voltage = 110, 100, -95, 90, -110, 100, -95, 90; - - max8997,pmic-buck5-dvs-voltage = 120, 120, -120, 120, -120, 120, -120, 120; - - regulators { - valive_reg: LDO2 { -regulator-name = VALIVE_1.1V_C210; -regulator-min-microvolt = 110; -regulator-max-microvolt = 110; -regulator-always-on; - }; - - vusb_reg: LDO3 { -regulator-name = VUSB_1.1V_C210; -regulator-min-microvolt = 110; -regulator-max-microvolt = 110; - }; - - vmipi_reg: LDO4 { -regulator-name = VMIPI_1.8V; -regulator-min-microvolt = 180; -regulator-max-microvolt = 180; -
[PATCHv2 03/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4210 Origen
Usage of lablels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4210-origen.dts | 418 1 file changed, 209 insertions(+), 209 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts index b81146141402..e0abfc3324d1 100644 --- a/arch/arm/boot/dts/exynos4210-origen.dts +++ b/arch/arm/boot/dts/exynos4210-origen.dts @@ -50,209 +50,6 @@ }; }; - watchdog@1006 { - status = okay; - }; - - rtc@1007 { - status = okay; - }; - - tmu@100C { - status = okay; - }; - - sdhci@1253 { - bus-width = 4; - pinctrl-0 = sd2_clk sd2_cmd sd2_bus4 sd2_cd; - pinctrl-names = default; - vmmc-supply = mmc_reg; - status = okay; - }; - - sdhci@1251 { - bus-width = 4; - pinctrl-0 = sd0_clk sd0_cmd sd0_bus4 sd0_cd; - pinctrl-names = default; - vmmc-supply = mmc_reg; - status = okay; - }; - - g2d@1280 { - status = okay; - }; - - codec@1340 { - samsung,mfc-r = 0x4300 0x80; - samsung,mfc-l = 0x5100 0x80; - status = okay; - }; - - serial@1380 { - status = okay; - }; - - serial@1381 { - status = okay; - }; - - serial@1382 { - status = okay; - }; - - serial@1383 { - status = okay; - }; - - i2c@1386 { - status = okay; - samsung,i2c-sda-delay = 100; - samsung,i2c-max-bus-freq = 2; - pinctrl-0 = i2c0_bus; - pinctrl-names = default; - - max8997_pmic@66 { - compatible = maxim,max8997-pmic; - reg = 0x66; - interrupt-parent = gpx0; - interrupts = 4 0, 3 0; - - max8997,pmic-buck1-dvs-voltage = 135; - max8997,pmic-buck2-dvs-voltage = 110; - max8997,pmic-buck5-dvs-voltage = 120; - - regulators { - ldo1_reg: LDO1 { - regulator-name = VDD_ABB_3.3V; - regulator-min-microvolt = 330; - regulator-max-microvolt = 330; - }; - - ldo2_reg: LDO2 { - regulator-name = VDD_ALIVE_1.1V; - regulator-min-microvolt = 110; - regulator-max-microvolt = 110; - regulator-always-on; - }; - - ldo3_reg: LDO3 { - regulator-name = VMIPI_1.1V; - regulator-min-microvolt = 110; - regulator-max-microvolt = 110; - }; - - ldo4_reg: LDO4 { - regulator-name = VDD_RTC_1.8V; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - regulator-always-on; - }; - - ldo6_reg: LDO6 { - regulator-name = VMIPI_1.8V; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - regulator-always-on; - }; - - ldo7_reg: LDO7 { - regulator-name = VDD_AUD_1.8V; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - }; - - ldo8_reg: LDO8 { - regulator-name = VADC_3.3V; - regulator-min-microvolt = 330; - regulator-max-microvolt = 330; - }; - - ldo9_reg: LDO9 { - regulator-name = DVDD_SWB_2.8V; - regulator-min-microvolt = 280; -
[PATCHv2 06/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4212
Usage of lablels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4212.dtsi | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/exynos4212.dtsi b/arch/arm/boot/dts/exynos4212.dtsi index 5be03288f1ee..d9c8efeef208 100644 --- a/arch/arm/boot/dts/exynos4212.dtsi +++ b/arch/arm/boot/dts/exynos4212.dtsi @@ -41,12 +41,12 @@ reg = 0xA01; }; }; +}; - combiner: interrupt-controller@1044 { - samsung,combiner-nr = 18; - }; +combiner { + samsung,combiner-nr = 18; +}; - gic: interrupt-controller@1049 { - cpu-offset = 0x8000; - }; +gic { + cpu-offset = 0x8000; }; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 07/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4x12
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4x12.dtsi | 210 +++--- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index 657b5ca39ce8..04812b842290 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi @@ -96,32 +96,6 @@ }; }; - combiner: interrupt-controller@1044 { - interrupts = 0 0 0, 0 1 0, 0 2 0, 0 3 0, -0 4 0, 0 5 0, 0 6 0, 0 7 0, -0 8 0, 0 9 0, 0 10 0, 0 11 0, -0 12 0, 0 13 0, 0 14 0, 0 15 0, -0 107 0, 0 108 0, 0 48 0, 0 42 0; - }; - - pinctrl_0: pinctrl@1140 { - compatible = samsung,exynos4x12-pinctrl; - reg = 0x1140 0x1000; - interrupts = 0 47 0; - }; - - pinctrl_1: pinctrl@1100 { - compatible = samsung,exynos4x12-pinctrl; - reg = 0x1100 0x1000; - interrupts = 0 46 0; - - wakup_eint: wakeup-interrupt-controller { - compatible = samsung,exynos4210-wakeup-eint; - interrupt-parent = gic; - interrupts = 0 32 0; - }; - }; - adc: adc@126C { compatible = samsung,exynos-adc-v1; reg = 0x126C 0x100; @@ -135,30 +109,6 @@ status = disabled; }; - pinctrl_2: pinctrl@0386 { - compatible = samsung,exynos4x12-pinctrl; - reg = 0x0386 0x1000; - interrupt-parent = combiner; - interrupts = 10 0; - }; - - pinctrl_3: pinctrl@106E { - compatible = samsung,exynos4x12-pinctrl; - reg = 0x106E 0x1000; - interrupts = 0 72 0; - }; - - pmu_system_controller: system-controller@1002 { - compatible = samsung,exynos4212-pmu, syscon; - clock-names = clkout0, clkout1, clkout2, clkout3, - clkout4, clkout8, clkout9; - clocks = clock CLK_OUT_DMC, clock CLK_OUT_TOP, - clock CLK_OUT_LEFTBUS, clock CLK_OUT_RIGHTBUS, - clock CLK_OUT_CPU, clock CLK_XXTI, - clock CLK_XUSBXTI; - #clock-cells = 1; - }; - g2d: g2d@1080 { compatible = samsung,exynos4212-g2d; reg = 0x1080 0x1000; @@ -173,40 +123,7 @@ clock CLK_PIXELASYNCM0, clock CLK_PIXELASYNCM1; clock-names = sclk_cam0, sclk_cam1, pxl_async0, pxl_async1; - fimc_0: fimc@1180 { - compatible = samsung,exynos4212-fimc; - samsung,pix-limits = 4224 8192 1920 4224; - samsung,mainscaler-ext; - samsung,isp-wb; - samsung,cam-if; - }; - - fimc_1: fimc@1181 { - compatible = samsung,exynos4212-fimc; - samsung,pix-limits = 4224 8192 1920 4224; - samsung,mainscaler-ext; - samsung,isp-wb; - samsung,cam-if; - }; - - fimc_2: fimc@1182 { - compatible = samsung,exynos4212-fimc; - samsung,pix-limits = 4224 8192 1920 4224; - samsung,mainscaler-ext; - samsung,isp-wb; - samsung,lcd-wb; - samsung,cam-if; - }; - - fimc_3: fimc@1183 { - compatible = samsung,exynos4212-fimc; - samsung,pix-limits = 1920 8192 1366 1920; - samsung,rotators = 0; - samsung,mainscaler-ext; - samsung,isp-wb; - samsung,lcd-wb; - }; - + /* fimc_[0-3] are configured outside, under phandles */ fimc_lite_0: fimc-lite@1239 { compatible = samsung,exynos4212-fimc-lite; reg = 0x1239 0x1000; @@ -283,30 +200,113 @@ clock-names = biu, ciu; status = disabled; }; +}; - exynos-usbphy@125B { - compatible = samsung,exynos4x12-usb2-phy; - samsung,sysreg-phandle = sys_reg; - }; +combiner { + interrupts = 0 0 0, 0 1 0, 0 2 0, 0 3 0, +0 4 0, 0 5 0, 0 6 0, 0 7 0, +0 8 0, 0 9 0, 0 10 0, 0 11 0, +0 12 0, 0 13 0,
[PATCH v3 08/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4412
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4412.dtsi | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi index 68ad43b391ae..b78ada70bd05 100644 --- a/arch/arm/boot/dts/exynos4412.dtsi +++ b/arch/arm/boot/dts/exynos4412.dtsi @@ -54,19 +54,19 @@ }; }; - combiner: interrupt-controller@1044 { - samsung,combiner-nr = 20; - }; - pmu { interrupts = 2 2, 3 2, 18 2, 19 2; }; +}; - gic: interrupt-controller@1049 { - cpu-offset = 0x4000; - }; +pmu_system_controller { + compatible = samsung,exynos4412-pmu, syscon; +}; - pmu_system_controller: system-controller@1002 { - compatible = samsung,exynos4412-pmu, syscon; - }; +combiner { + samsung,combiner-nr = 20; +}; + +gic { + cpu-offset = 0x4000; }; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 09/11] ARM: dts: exynos4: Use labels for overriding nodes in Odroid
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 728 arch/arm/boot/dts/exynos4412-odroidx.dts| 16 +- 2 files changed, 372 insertions(+), 372 deletions(-) diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index 8de12af7c276..6801ee6c4449 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi @@ -37,16 +37,6 @@ }; }; - i2s0: i2s@0383 { - pinctrl-0 = i2s0_bus; - pinctrl-names = default; - status = okay; - clocks = clock_audss EXYNOS_I2S_BUS, -clock_audss EXYNOS_DOUT_AUD_BUS, -clock_audss EXYNOS_SCLK_I2S; - clock-names = iis, i2s_opclk0, i2s_opclk1; - }; - sound: sound { compatible = simple-audio-card; assigned-clocks = clock_audss EXYNOS_MOUT_AUDSS, @@ -82,425 +72,435 @@ reset-gpios = gpk1 2 1; }; - mmc@1255 { - pinctrl-0 = sd4_clk sd4_cmd sd4_bus4 sd4_bus8; - pinctrl-names = default; - vmmc-supply = ldo20_reg buck8_reg; - mmc-pwrseq = emmc_pwrseq; - status = okay; - - num-slots = 1; - broken-cd; - card-detect-delay = 200; - samsung,dw-mshc-ciu-div = 3; - samsung,dw-mshc-sdr-timing = 2 3; - samsung,dw-mshc-ddr-timing = 1 2; - bus-width = 8; - cap-mmc-highspeed; - }; - - watchdog@1006 { - status = okay; - }; - - rtc@1007 { - status = okay; - }; - - g2d@1080 { - status = okay; - }; - camera { status = okay; pinctrl-names = default; pinctrl-0 = ; + }; - fimc_0: fimc@1180 { - status = okay; - assigned-clocks = clock CLK_MOUT_FIMC0, - clock CLK_SCLK_FIMC0; - assigned-clock-parents = clock CLK_MOUT_MPLL_USER_T; - assigned-clock-rates = 0, 17600; - }; - - fimc_1: fimc@1181 { - status = okay; - assigned-clocks = clock CLK_MOUT_FIMC1, - clock CLK_SCLK_FIMC1; - assigned-clock-parents = clock CLK_MOUT_MPLL_USER_T; - assigned-clock-rates = 0, 17600; + fixed-rate-clocks { + xxti { + compatible = samsung,clock-xxti; + clock-frequency = 0; }; - fimc_2: fimc@1182 { - status = okay; - assigned-clocks = clock CLK_MOUT_FIMC2, - clock CLK_SCLK_FIMC2; - assigned-clock-parents = clock CLK_MOUT_MPLL_USER_T; - assigned-clock-rates = 0, 17600; + xusbxti { + compatible = samsung,clock-xusbxti; + clock-frequency = 2400; }; + }; - fimc_3: fimc@1183 { - status = okay; - assigned-clocks = clock CLK_MOUT_FIMC3, - clock CLK_SCLK_FIMC3; - assigned-clock-parents = clock CLK_MOUT_MPLL_USER_T; - assigned-clock-rates = 0, 17600; + thermal-zones { + cpu_thermal: cpu-thermal { + cooling-maps { + map0 { +/* Corresponds to 800MHz at freq_table */ +cooling-device = cpu0 7 7; + }; + map1 { +/* Corresponds to 200MHz at freq_table */ +cooling-device = cpu0 13 13; + }; + }; }; }; +}; - sdhci@1253 { - bus-width = 4; - pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus4; - pinctrl-names = default; - vmmc-supply = ldo4_reg ldo21_reg; - cd-gpios = gpk2 2 0; - cd-inverted; - status = okay; - }; +/* RSTN signal for eMMC */ +sd1_cd { + samsung,pin-pud = 0; + samsung,pin-drv = 0; +}; - serial@1380 { - status = okay; +pinctrl_1 { +
Re: [PATCH v2 2/5] mmc: mediatek: Add Mediatek MMC driver
Hi Chaotian, On Tue, Mar 17, 2015 at 11:13:52AM +0800, Chaotian Jing wrote: Add Mediatek MMC driver code [...] + host-dev = pdev-dev; + host-mmc = mmc; + /* Set host parameters to mmc */ + mmc-ops = mt_msdc_ops; + mmc-f_min = 26; + mmc-ocr_avail = MMC_VDD_30_31 | MMC_VDD_31_32 | MMC_VDD_32_33; + + mmc-caps |= MMC_CAP_ERASE | MMC_CAP_CMD23; + /* MMC core transfer sizes tunable parameters */ + mmc-max_segs = MAX_BD_NUM; + mmc-max_seg_size = 64 * 1024; Earlier versions of this driver had 64 * 1024 - 512 here. Using 64k breaks SD card support here. Reading the partition table still works fine, but the next transfers fail with messages like: mtk-msdc 1124.mmc: msdc_request_timeout: aborting cmd/data/mrq mtk-msdc 1124.mmc: msdc_request_timeout: aborting mrq=ffc06e586860 cmd=18 mtk-msdc 1124.mmc: msdc_request_timeout: abort data: cmd18; 136 blocks mmcblk1: error -110 transferring data, sector 338488, nr 136, cmd response 0x900, card status 0xb00 mtk-msdc 1124.mmc: set mclk to 0 mmc1: tried to reset card Can you confirm this? Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 04/11] ARM: dts: exynos4: Use labels for overriding nodes in SMDKv310
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4210-smdkv310.dts | 280 +++--- 1 file changed, 140 insertions(+), 140 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts index 86216fff1b4f..043b03caff8f 100644 --- a/arch/arm/boot/dts/exynos4210-smdkv310.dts +++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts @@ -30,181 +30,181 @@ stdout-path = serial_1; }; - sdhci@1253 { - bus-width = 4; - pinctrl-names = default; - pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus4; - status = okay; - }; + fixed-rate-clocks { + xxti { + compatible = samsung,clock-xxti; + clock-frequency = 1200; + }; - g2d@1280 { - status = okay; + xusbxti { + compatible = samsung,clock-xusbxti; + clock-frequency = 2400; + }; }; +}; - codec@1340 { - samsung,mfc-r = 0x4300 0x80; - samsung,mfc-l = 0x5100 0x80; - status = okay; - }; +g2d { + status = okay; +}; - serial@1380 { - status = okay; - }; +i2c_0 { + #address-cells = 1; + #size-cells = 0; + samsung,i2c-sda-delay = 100; + samsung,i2c-max-bus-freq = 10; + status = okay; - serial@1381 { - status = okay; + eeprom@50 { + compatible = samsung,24ad0xd1; + reg = 0x50; }; - serial@1382 { - status = okay; + eeprom@52 { + compatible = samsung,24ad0xd1; + reg = 0x52; }; +}; - serial@1383 { - status = okay; +keypad { + samsung,keypad-num-rows = 2; + samsung,keypad-num-columns = 8; + linux,keypad-no-autorepeat; + linux,keypad-wakeup; + pinctrl-names = default; + pinctrl-0 = keypad_rows keypad_cols; + status = okay; + + key_1 { + keypad,row = 0; + keypad,column = 3; + linux,code = 2; }; - pinctrl@1100 { - keypad_rows: keypad-rows { - samsung,pins = gpx2-0, gpx2-1; - samsung,pin-function = 3; - samsung,pin-pud = 3; - samsung,pin-drv = 0; - }; - - keypad_cols: keypad-cols { - samsung,pins = gpx1-0, gpx1-1, gpx1-2, gpx1-3, - gpx1-4, gpx1-5, gpx1-6, gpx1-7; - samsung,pin-function = 3; - samsung,pin-pud = 0; - samsung,pin-drv = 0; - }; + key_2 { + keypad,row = 0; + keypad,column = 4; + linux,code = 3; }; - keypad@100A { - samsung,keypad-num-rows = 2; - samsung,keypad-num-columns = 8; - linux,keypad-no-autorepeat; - linux,keypad-wakeup; - pinctrl-names = default; - pinctrl-0 = keypad_rows keypad_cols; - status = okay; + key_3 { + keypad,row = 0; + keypad,column = 5; + linux,code = 4; + }; - key_1 { - keypad,row = 0; - keypad,column = 3; - linux,code = 2; - }; + key_4 { + keypad,row = 0; + keypad,column = 6; + linux,code = 5; + }; - key_2 { - keypad,row = 0; - keypad,column = 4; - linux,code = 3; - }; + key_5 { + keypad,row = 0; + keypad,column = 7; + linux,code = 6; + }; - key_3 { - keypad,row = 0; - keypad,column = 5; - linux,code = 4; - }; + key_a { + keypad,row = 1; + keypad,column = 3; + linux,code = 30; + }; - key_4 { - keypad,row = 0; - keypad,column = 6; - linux,code = 5; - }; + key_b { + keypad,row = 1; + keypad,column = 4; + linux,code = 48; + }; - key_5 { - keypad,row = 0; - keypad,column = 7; - linux,code = 6; - }; + key_c { +
[PATCH v3 10/11] ARM: dts: exynos4: Use labels for overriding nodes in SMDK4412
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4412-smdk4412.dts | 210 +++--- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/arch/arm/boot/dts/exynos4412-smdk4412.dts b/arch/arm/boot/dts/exynos4412-smdk4412.dts index b9256afbcc68..c2421df1fa43 100644 --- a/arch/arm/boot/dts/exynos4412-smdk4412.dts +++ b/arch/arm/boot/dts/exynos4412-smdk4412.dts @@ -28,135 +28,135 @@ stdout-path = serial_1; }; - g2d@1080 { - status = okay; - }; - - pinctrl@1100 { - keypad_rows: keypad-rows { - samsung,pins = gpx2-0, gpx2-1, gpx2-2; - samsung,pin-function = 3; - samsung,pin-pud = 3; - samsung,pin-drv = 0; + fixed-rate-clocks { + xxti { + compatible = samsung,clock-xxti; + clock-frequency = 0; }; - keypad_cols: keypad-cols { - samsung,pins = gpx1-0, gpx1-1, gpx1-2, gpx1-3, - gpx1-4, gpx1-5, gpx1-6, gpx1-7; - samsung,pin-function = 3; - samsung,pin-pud = 0; - samsung,pin-drv = 0; + xusbxti { + compatible = samsung,clock-xusbxti; + clock-frequency = 2400; }; }; +}; - keypad@100A { - samsung,keypad-num-rows = 3; - samsung,keypad-num-columns = 8; - linux,keypad-no-autorepeat; - linux,keypad-wakeup; - pinctrl-0 = keypad_rows keypad_cols; - pinctrl-names = default; - status = okay; - - key_1 { - keypad,row = 1; - keypad,column = 3; - linux,code = 2; - }; - - key_2 { - keypad,row = 1; - keypad,column = 4; - linux,code = 3; - }; - - key_3 { - keypad,row = 1; - keypad,column = 5; - linux,code = 4; - }; - - key_4 { - keypad,row = 1; - keypad,column = 6; - linux,code = 5; - }; +g2d { + status = okay; +}; - key_5 { - keypad,row = 1; - keypad,column = 7; - linux,code = 6; - }; +keypad { + samsung,keypad-num-rows = 3; + samsung,keypad-num-columns = 8; + linux,keypad-no-autorepeat; + linux,keypad-wakeup; + pinctrl-0 = keypad_rows keypad_cols; + pinctrl-names = default; + status = okay; + + key_1 { + keypad,row = 1; + keypad,column = 3; + linux,code = 2; + }; - key_A { - keypad,row = 2; - keypad,column = 6; - linux,code = 30; - }; + key_2 { + keypad,row = 1; + keypad,column = 4; + linux,code = 3; + }; - key_B { - keypad,row = 2; - keypad,column = 7; - linux,code = 48; - }; + key_3 { + keypad,row = 1; + keypad,column = 5; + linux,code = 4; + }; - key_C { - keypad,row = 0; - keypad,column = 5; - linux,code = 46; - }; + key_4 { + keypad,row = 1; + keypad,column = 6; + linux,code = 5; + }; - key_D { - keypad,row = 2; - keypad,column = 5; - linux,code = 32; - }; + key_5 { + keypad,row = 1; + keypad,column = 7; + linux,code = 6; + }; - key_E { - keypad,row = 0; - keypad,column = 7; - linux,code = 18; - }; + key_A { + keypad,row = 2; + keypad,column = 6; + linux,code = 30; }; - sdhci@1253 { - bus-width = 4; - pinctrl-0 = sd2_clk sd2_cmd sd2_bus4 sd2_cd; - pinctrl-names = default; - status = okay; + key_B { + keypad,row = 2; + keypad,column = 7; + linux,code = 48; }; -
[PATCH v3 01/11] ARM: dts: Add labels to Exynos4 nodes
Add new labels to certain nodes so they could be easily referenced by Exynos4 board DTS files. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4.dtsi| 22 +++--- arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 6 +++--- arch/arm/boot/dts/exynos4210.dtsi | 6 +++--- arch/arm/boot/dts/exynos4x12-pinctrl.dtsi | 8 arch/arm/boot/dts/exynos4x12.dtsi | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index e20cdc24c3bb..ef944e4f42d0 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -257,7 +257,7 @@ }; }; - watchdog@1006 { + watchdog: watchdog@1006 { compatible = samsung,s3c2410-wdt; reg = 0x1006 0x100; interrupts = 0 43 0; @@ -266,7 +266,7 @@ status = disabled; }; - rtc@1007 { + rtc: rtc@1007 { compatible = samsung,s3c6410-rtc; reg = 0x1007 0x100; interrupt-parent = pmu_system_controller; @@ -276,7 +276,7 @@ status = disabled; }; - keypad@100A { + keypad: keypad@100A { compatible = samsung,s5pv210-keypad; reg = 0x100A 0x100; interrupts = 0 109 0; @@ -285,7 +285,7 @@ status = disabled; }; - sdhci@1251 { + sdhci_0: sdhci@1251 { compatible = samsung,exynos4210-sdhci; reg = 0x1251 0x100; interrupts = 0 73 0; @@ -294,7 +294,7 @@ status = disabled; }; - sdhci@1252 { + sdhci_1: sdhci@1252 { compatible = samsung,exynos4210-sdhci; reg = 0x1252 0x100; interrupts = 0 74 0; @@ -303,7 +303,7 @@ status = disabled; }; - sdhci@1253 { + sdhci_2: sdhci@1253 { compatible = samsung,exynos4210-sdhci; reg = 0x1253 0x100; interrupts = 0 75 0; @@ -312,7 +312,7 @@ status = disabled; }; - sdhci@1254 { + sdhci_3: sdhci@1254 { compatible = samsung,exynos4210-sdhci; reg = 0x1254 0x100; interrupts = 0 76 0; @@ -331,7 +331,7 @@ status = disabled; }; - hsotg@1248 { + hsotg: hsotg@1248 { compatible = samsung,s3c6400-hsotg; reg = 0x1248 0x2; interrupts = 0 71 0; @@ -342,7 +342,7 @@ status = disabled; }; - ehci@1258 { + ehci: ehci@1258 { compatible = samsung,exynos4210-ehci; reg = 0x1258 0x100; interrupts = 0 70 0; @@ -368,7 +368,7 @@ }; }; - ohci@1259 { + ohci: ohci@1259 { compatible = samsung,exynos4210-ohci; reg = 0x1259 0x100; interrupts = 0 70 0; @@ -621,7 +621,7 @@ status = disabled; }; - pwm@139D { + pwm: pwm@139D { compatible = samsung,exynos4210-pwm; reg = 0x139D 0x1000; interrupts = 0 37 0, 0 38 0, 0 39 0, 0 40 0, 0 41 0; diff --git a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi index a7c212891674..4704e7bb2628 100644 --- a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi @@ -15,7 +15,7 @@ */ / { - pinctrl@1140 { + pinctrl_0: pinctrl@1140 { gpa0: gpa0 { gpio-controller; #gpio-cells = 2; @@ -421,7 +421,7 @@ }; }; - pinctrl@1100 { + pinctrl_1: pinctrl@1100 { gpj0: gpj0 { gpio-controller; #gpio-cells = 2; @@ -822,7 +822,7 @@ }; }; - pinctrl@0386 { + pinctrl_3: pinctrl@0386 { gpz: gpz { gpio-controller; #gpio-cells = 2; diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index be89f83f70e7..76b84852f29c 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -62,7 +62,7 @@ #clock-cells = 1; }; - sysram@0202 { + sysram: sysram@0202 { compatible = mmio-sram; reg = 0x0202 0x2; #address-cells = 1; @@ -107,7 +107,7 @@ 0 12 0, 0 13 0, 0 14 0, 0 15 0; }; - mct@1005 { + mct:
[PATCH v3 11/11] ARM: dts: exynos4: Use labels for overriding nodes in Trats2
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4412-trats2.dts | 1331 --- 1 file changed, 666 insertions(+), 665 deletions(-) diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts b/arch/arm/boot/dts/exynos4412-trats2.dts index 173ffa479ad3..e83929c2dc90 100644 --- a/arch/arm/boot/dts/exynos4412-trats2.dts +++ b/arch/arm/boot/dts/exynos4412-trats2.dts @@ -130,411 +130,6 @@ }; }; - adc: adc@126C { - vdd-supply = ldo3_reg; - status = okay; - }; - - i2c@1389 { - samsung,i2c-sda-delay = 100; - samsung,i2c-slave-addr = 0x10; - samsung,i2c-max-bus-freq = 40; - pinctrl-0 = i2c3_bus; - pinctrl-names = default; - status = okay; - - mms114-touchscreen@48 { - compatible = melfas,mms114; - reg = 0x48; - interrupt-parent = gpm2; - interrupts = 3 2; - x-size = 720; - y-size = 1280; - avdd-supply = ldo23_reg; - vdd-supply = ldo24_reg; - }; - }; - - i2c_0: i2c@1386 { - samsung,i2c-sda-delay = 100; - samsung,i2c-slave-addr = 0x10; - samsung,i2c-max-bus-freq = 40; - pinctrl-0 = i2c0_bus; - pinctrl-names = default; - status = okay; - - s5c73m3@3c { - compatible = samsung,s5c73m3; - reg = 0x3c; - standby-gpios = gpm0 1 1; /* ISP_STANDBY */ - xshutdown-gpios = gpf1 3 1; /* ISP_RESET */ - vdd-int-supply = buck9_reg; - vddio-cis-supply = ldo9_reg; - vdda-supply = ldo17_reg; - vddio-host-supply = ldo18_reg; - vdd-af-supply = cam_af_reg; - vdd-reg-supply = cam_io_reg; - clock-frequency = 2400; - /* CAM_A_CLKOUT */ - clocks = camera 0; - clock-names = cis_extclk; - port { - s5c73m3_ep: endpoint { - remote-endpoint = csis0_ep; - data-lanes = 1 2 3 4; - }; - }; - }; - }; - - i2c@138A { - samsung,i2c-sda-delay = 100; - samsung,i2c-slave-addr = 0x10; - samsung,i2c-max-bus-freq = 10; - pinctrl-0 = i2c4_bus; - pinctrl-names = default; - status = okay; - - wm1811: wm1811@1a { - compatible = wlf,wm1811; - reg = 0x1a; - clocks = pmu_system_controller 0; - clock-names = MCLK1; - DCVDD-supply = ldo3_reg; - DBVDD1-supply = ldo3_reg; - wlf,ldo1ena = gpj0 4 0; - }; - }; - - i2c@138D { - samsung,i2c-sda-delay = 100; - samsung,i2c-slave-addr = 0x10; - samsung,i2c-max-bus-freq = 10; - pinctrl-0 = i2c7_bus; - pinctrl-names = default; - status = okay; - - max77686_pmic@09 { - compatible = maxim,max77686; - interrupt-parent = gpx0; - interrupts = 7 0; - reg = 0x09; - #clock-cells = 1; - - voltage-regulators { - ldo1_reg: ldo1 { - regulator-compatible = LDO1; - regulator-name = VALIVE_1.0V_AP; - regulator-min-microvolt = 100; - regulator-max-microvolt = 100; - regulator-always-on; - }; - - ldo2_reg: ldo2 { - regulator-compatible = LDO2; - regulator-name = VM1M2_1.2V_AP; - regulator-min-microvolt = 120; - regulator-max-microvolt = 120; - regulator-always-on; - regulator-state-mem { - regulator-on-in-suspend; -
[PATCH v3 03/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4210 Origen
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4210-origen.dts | 418 1 file changed, 209 insertions(+), 209 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts index b81146141402..e0abfc3324d1 100644 --- a/arch/arm/boot/dts/exynos4210-origen.dts +++ b/arch/arm/boot/dts/exynos4210-origen.dts @@ -50,209 +50,6 @@ }; }; - watchdog@1006 { - status = okay; - }; - - rtc@1007 { - status = okay; - }; - - tmu@100C { - status = okay; - }; - - sdhci@1253 { - bus-width = 4; - pinctrl-0 = sd2_clk sd2_cmd sd2_bus4 sd2_cd; - pinctrl-names = default; - vmmc-supply = mmc_reg; - status = okay; - }; - - sdhci@1251 { - bus-width = 4; - pinctrl-0 = sd0_clk sd0_cmd sd0_bus4 sd0_cd; - pinctrl-names = default; - vmmc-supply = mmc_reg; - status = okay; - }; - - g2d@1280 { - status = okay; - }; - - codec@1340 { - samsung,mfc-r = 0x4300 0x80; - samsung,mfc-l = 0x5100 0x80; - status = okay; - }; - - serial@1380 { - status = okay; - }; - - serial@1381 { - status = okay; - }; - - serial@1382 { - status = okay; - }; - - serial@1383 { - status = okay; - }; - - i2c@1386 { - status = okay; - samsung,i2c-sda-delay = 100; - samsung,i2c-max-bus-freq = 2; - pinctrl-0 = i2c0_bus; - pinctrl-names = default; - - max8997_pmic@66 { - compatible = maxim,max8997-pmic; - reg = 0x66; - interrupt-parent = gpx0; - interrupts = 4 0, 3 0; - - max8997,pmic-buck1-dvs-voltage = 135; - max8997,pmic-buck2-dvs-voltage = 110; - max8997,pmic-buck5-dvs-voltage = 120; - - regulators { - ldo1_reg: LDO1 { - regulator-name = VDD_ABB_3.3V; - regulator-min-microvolt = 330; - regulator-max-microvolt = 330; - }; - - ldo2_reg: LDO2 { - regulator-name = VDD_ALIVE_1.1V; - regulator-min-microvolt = 110; - regulator-max-microvolt = 110; - regulator-always-on; - }; - - ldo3_reg: LDO3 { - regulator-name = VMIPI_1.1V; - regulator-min-microvolt = 110; - regulator-max-microvolt = 110; - }; - - ldo4_reg: LDO4 { - regulator-name = VDD_RTC_1.8V; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - regulator-always-on; - }; - - ldo6_reg: LDO6 { - regulator-name = VMIPI_1.8V; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - regulator-always-on; - }; - - ldo7_reg: LDO7 { - regulator-name = VDD_AUD_1.8V; - regulator-min-microvolt = 180; - regulator-max-microvolt = 180; - }; - - ldo8_reg: LDO8 { - regulator-name = VADC_3.3V; - regulator-min-microvolt = 330; - regulator-max-microvolt = 330; - }; - - ldo9_reg: LDO9 { - regulator-name = DVDD_SWB_2.8V; - regulator-min-microvolt = 280; -
[PATCH v3 00/11] ARM: dts: exynos4: labels for overriding nodes
Hi, Changes since v2 1. Fix typo in commit msg (lablels - labels). Changes since v1 1. Re-phrased the description (phandle-label). Suggested by Arnd. Description === The label-based notation reduces possible mistakes when overriding nodes by child DTSI and board files and reduces duplication of addresses. The patchset refactors Exynos4 boards to use labels for overriding nodes. Tested by comparison of decompiled DTB for each commit. Best regards, Krzysztof Krzysztof Kozlowski (11): ARM: dts: Add labels to Exynos4 nodes ARM: dts: exynos4: Use labels for overriding nodes in Exynos4210 ARM: dts: exynos4: Use labels for overriding nodes in Exynos4210 Origen ARM: dts: exynos4: Use labels for overriding nodes in SMDKv310 ARM: dts: exynos4: Use labels for overriding nodes in Trats ARM: dts: exynos4: Use labels for overriding nodes in Exynos4212 ARM: dts: exynos4: Use labels for overriding nodes in Exynos4x12 ARM: dts: exynos4: Use labels for overriding nodes in Exynos4412 ARM: dts: exynos4: Use labels for overriding nodes in Odroid ARM: dts: exynos4: Use labels for overriding nodes in SMDK4412 ARM: dts: exynos4: Use labels for overriding nodes in Trats2 arch/arm/boot/dts/exynos4.dtsi | 22 +- arch/arm/boot/dts/exynos4210-origen.dts | 418 +++ arch/arm/boot/dts/exynos4210-pinctrl.dtsi |6 +- arch/arm/boot/dts/exynos4210-smdkv310.dts | 280 ++--- arch/arm/boot/dts/exynos4210-trats.dts | 592 +- arch/arm/boot/dts/exynos4210.dtsi | 49 +- arch/arm/boot/dts/exynos4212.dtsi | 12 +- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 728 ++--- arch/arm/boot/dts/exynos4412-odroidx.dts| 16 +- arch/arm/boot/dts/exynos4412-smdk4412.dts | 210 ++-- arch/arm/boot/dts/exynos4412-trats2.dts | 1331 --- arch/arm/boot/dts/exynos4412.dtsi | 20 +- arch/arm/boot/dts/exynos4x12-pinctrl.dtsi |8 +- arch/arm/boot/dts/exynos4x12.dtsi | 212 ++-- 14 files changed, 1952 insertions(+), 1952 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 0/7] ARM: dts: exynos5: labels for overriding nodes
Hi, Changes since v1 1. Re-phrased the description (phandle-label). Suggested by Arnd. Description === The label-based notation reduces possible mistakes when overriding nodes by child DTSI and board files and reduces duplication of addresses. The patchset refactors Exynos5 boards to use labels for overriding nodes. Tested by comparison of decompiled DTB for each commit. Patchset depends (to reduce conflicts) on following patches: 1. v2: ARM: dts: Enable S3C RTC on Trats2 and Arndale Octa http://www.spinics.net/lists/arm-kernel/msg410429.html 2. ARM: dts: Fix pinctrl settings for S2MPS11 RTC alarm IRQ on Arndale Octa http://www.spinics.net/lists/linux-samsung-soc/msg43435.html Best regards, Krzysztof Krzysztof Kozlowski (7): ARM: dts: Add labels to Exynos5 nodes ARM: dts: exynos5: Use labels for overriding nodes in Exynos5250 ARM: dts: exynos5: Remove duplicated I2C7 nodes in Snow ARM: dts: exynos5: Use labels for overriding nodes in Arndale Octa ARM: dts: exynos5: Use labels for overriding nodes in Exynos5420 ARM: dts: exynos5: Use labels for overriding nodes in SMDK5420 ARM: dts: exynos5: Use labels for overriding nodes in Exynos5440 boards arch/arm/boot/dts/exynos5.dtsi| 6 +- arch/arm/boot/dts/exynos5250-snow.dts | 46 +- arch/arm/boot/dts/exynos5250.dtsi | 82 ++-- arch/arm/boot/dts/exynos5420-arndale-octa.dts | 634 - arch/arm/boot/dts/exynos5420-peach-pit.dts| 2 +- arch/arm/boot/dts/exynos5420-smdk5420.dts | 645 +- arch/arm/boot/dts/exynos5420.dtsi | 80 ++-- arch/arm/boot/dts/exynos5440-sd5v1.dts| 10 +- arch/arm/boot/dts/exynos5440-ssdk5440.dts | 85 ++-- arch/arm/boot/dts/exynos5440.dtsi | 4 +- arch/arm/boot/dts/exynos5800-peach-pi.dts | 2 +- 11 files changed, 797 insertions(+), 799 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 01/11] ARM: dts: Add labels to Exynos4 nodes
Add new labels to certain nodes so they could be easily referenced by Exynos4 board DTS files. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4.dtsi| 22 +++--- arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 6 +++--- arch/arm/boot/dts/exynos4210.dtsi | 6 +++--- arch/arm/boot/dts/exynos4x12-pinctrl.dtsi | 8 arch/arm/boot/dts/exynos4x12.dtsi | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index e20cdc24c3bb..ef944e4f42d0 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -257,7 +257,7 @@ }; }; - watchdog@1006 { + watchdog: watchdog@1006 { compatible = samsung,s3c2410-wdt; reg = 0x1006 0x100; interrupts = 0 43 0; @@ -266,7 +266,7 @@ status = disabled; }; - rtc@1007 { + rtc: rtc@1007 { compatible = samsung,s3c6410-rtc; reg = 0x1007 0x100; interrupt-parent = pmu_system_controller; @@ -276,7 +276,7 @@ status = disabled; }; - keypad@100A { + keypad: keypad@100A { compatible = samsung,s5pv210-keypad; reg = 0x100A 0x100; interrupts = 0 109 0; @@ -285,7 +285,7 @@ status = disabled; }; - sdhci@1251 { + sdhci_0: sdhci@1251 { compatible = samsung,exynos4210-sdhci; reg = 0x1251 0x100; interrupts = 0 73 0; @@ -294,7 +294,7 @@ status = disabled; }; - sdhci@1252 { + sdhci_1: sdhci@1252 { compatible = samsung,exynos4210-sdhci; reg = 0x1252 0x100; interrupts = 0 74 0; @@ -303,7 +303,7 @@ status = disabled; }; - sdhci@1253 { + sdhci_2: sdhci@1253 { compatible = samsung,exynos4210-sdhci; reg = 0x1253 0x100; interrupts = 0 75 0; @@ -312,7 +312,7 @@ status = disabled; }; - sdhci@1254 { + sdhci_3: sdhci@1254 { compatible = samsung,exynos4210-sdhci; reg = 0x1254 0x100; interrupts = 0 76 0; @@ -331,7 +331,7 @@ status = disabled; }; - hsotg@1248 { + hsotg: hsotg@1248 { compatible = samsung,s3c6400-hsotg; reg = 0x1248 0x2; interrupts = 0 71 0; @@ -342,7 +342,7 @@ status = disabled; }; - ehci@1258 { + ehci: ehci@1258 { compatible = samsung,exynos4210-ehci; reg = 0x1258 0x100; interrupts = 0 70 0; @@ -368,7 +368,7 @@ }; }; - ohci@1259 { + ohci: ohci@1259 { compatible = samsung,exynos4210-ohci; reg = 0x1259 0x100; interrupts = 0 70 0; @@ -621,7 +621,7 @@ status = disabled; }; - pwm@139D { + pwm: pwm@139D { compatible = samsung,exynos4210-pwm; reg = 0x139D 0x1000; interrupts = 0 37 0, 0 38 0, 0 39 0, 0 40 0, 0 41 0; diff --git a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi index a7c212891674..4704e7bb2628 100644 --- a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi @@ -15,7 +15,7 @@ */ / { - pinctrl@1140 { + pinctrl_0: pinctrl@1140 { gpa0: gpa0 { gpio-controller; #gpio-cells = 2; @@ -421,7 +421,7 @@ }; }; - pinctrl@1100 { + pinctrl_1: pinctrl@1100 { gpj0: gpj0 { gpio-controller; #gpio-cells = 2; @@ -822,7 +822,7 @@ }; }; - pinctrl@0386 { + pinctrl_3: pinctrl@0386 { gpz: gpz { gpio-controller; #gpio-cells = 2; diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index be89f83f70e7..76b84852f29c 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -62,7 +62,7 @@ #clock-cells = 1; }; - sysram@0202 { + sysram: sysram@0202 { compatible = mmio-sram; reg = 0x0202 0x2; #address-cells = 1; @@ -107,7 +107,7 @@ 0 12 0, 0 13 0, 0 14 0, 0 15 0; }; - mct@1005 { + mct:
[PATCHv2 07/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4x12
Usage of lablels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4x12.dtsi | 210 +++--- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index 657b5ca39ce8..04812b842290 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi @@ -96,32 +96,6 @@ }; }; - combiner: interrupt-controller@1044 { - interrupts = 0 0 0, 0 1 0, 0 2 0, 0 3 0, -0 4 0, 0 5 0, 0 6 0, 0 7 0, -0 8 0, 0 9 0, 0 10 0, 0 11 0, -0 12 0, 0 13 0, 0 14 0, 0 15 0, -0 107 0, 0 108 0, 0 48 0, 0 42 0; - }; - - pinctrl_0: pinctrl@1140 { - compatible = samsung,exynos4x12-pinctrl; - reg = 0x1140 0x1000; - interrupts = 0 47 0; - }; - - pinctrl_1: pinctrl@1100 { - compatible = samsung,exynos4x12-pinctrl; - reg = 0x1100 0x1000; - interrupts = 0 46 0; - - wakup_eint: wakeup-interrupt-controller { - compatible = samsung,exynos4210-wakeup-eint; - interrupt-parent = gic; - interrupts = 0 32 0; - }; - }; - adc: adc@126C { compatible = samsung,exynos-adc-v1; reg = 0x126C 0x100; @@ -135,30 +109,6 @@ status = disabled; }; - pinctrl_2: pinctrl@0386 { - compatible = samsung,exynos4x12-pinctrl; - reg = 0x0386 0x1000; - interrupt-parent = combiner; - interrupts = 10 0; - }; - - pinctrl_3: pinctrl@106E { - compatible = samsung,exynos4x12-pinctrl; - reg = 0x106E 0x1000; - interrupts = 0 72 0; - }; - - pmu_system_controller: system-controller@1002 { - compatible = samsung,exynos4212-pmu, syscon; - clock-names = clkout0, clkout1, clkout2, clkout3, - clkout4, clkout8, clkout9; - clocks = clock CLK_OUT_DMC, clock CLK_OUT_TOP, - clock CLK_OUT_LEFTBUS, clock CLK_OUT_RIGHTBUS, - clock CLK_OUT_CPU, clock CLK_XXTI, - clock CLK_XUSBXTI; - #clock-cells = 1; - }; - g2d: g2d@1080 { compatible = samsung,exynos4212-g2d; reg = 0x1080 0x1000; @@ -173,40 +123,7 @@ clock CLK_PIXELASYNCM0, clock CLK_PIXELASYNCM1; clock-names = sclk_cam0, sclk_cam1, pxl_async0, pxl_async1; - fimc_0: fimc@1180 { - compatible = samsung,exynos4212-fimc; - samsung,pix-limits = 4224 8192 1920 4224; - samsung,mainscaler-ext; - samsung,isp-wb; - samsung,cam-if; - }; - - fimc_1: fimc@1181 { - compatible = samsung,exynos4212-fimc; - samsung,pix-limits = 4224 8192 1920 4224; - samsung,mainscaler-ext; - samsung,isp-wb; - samsung,cam-if; - }; - - fimc_2: fimc@1182 { - compatible = samsung,exynos4212-fimc; - samsung,pix-limits = 4224 8192 1920 4224; - samsung,mainscaler-ext; - samsung,isp-wb; - samsung,lcd-wb; - samsung,cam-if; - }; - - fimc_3: fimc@1183 { - compatible = samsung,exynos4212-fimc; - samsung,pix-limits = 1920 8192 1366 1920; - samsung,rotators = 0; - samsung,mainscaler-ext; - samsung,isp-wb; - samsung,lcd-wb; - }; - + /* fimc_[0-3] are configured outside, under phandles */ fimc_lite_0: fimc-lite@1239 { compatible = samsung,exynos4212-fimc-lite; reg = 0x1239 0x1000; @@ -283,30 +200,113 @@ clock-names = biu, ciu; status = disabled; }; +}; - exynos-usbphy@125B { - compatible = samsung,exynos4x12-usb2-phy; - samsung,sysreg-phandle = sys_reg; - }; +combiner { + interrupts = 0 0 0, 0 1 0, 0 2 0, 0 3 0, +0 4 0, 0 5 0, 0 6 0, 0 7 0, +0 8 0, 0 9 0, 0 10 0, 0 11 0, +0 12 0, 0 13 0,
[PATCHv2 08/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4412
Usage of lablels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4412.dtsi | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi index 68ad43b391ae..b78ada70bd05 100644 --- a/arch/arm/boot/dts/exynos4412.dtsi +++ b/arch/arm/boot/dts/exynos4412.dtsi @@ -54,19 +54,19 @@ }; }; - combiner: interrupt-controller@1044 { - samsung,combiner-nr = 20; - }; - pmu { interrupts = 2 2, 3 2, 18 2, 19 2; }; +}; - gic: interrupt-controller@1049 { - cpu-offset = 0x4000; - }; +pmu_system_controller { + compatible = samsung,exynos4412-pmu, syscon; +}; - pmu_system_controller: system-controller@1002 { - compatible = samsung,exynos4412-pmu, syscon; - }; +combiner { + samsung,combiner-nr = 20; +}; + +gic { + cpu-offset = 0x4000; }; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 04/11] ARM: dts: exynos4: Use labels for overriding nodes in SMDKv310
Usage of lablels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4210-smdkv310.dts | 280 +++--- 1 file changed, 140 insertions(+), 140 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts index 86216fff1b4f..043b03caff8f 100644 --- a/arch/arm/boot/dts/exynos4210-smdkv310.dts +++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts @@ -30,181 +30,181 @@ stdout-path = serial_1; }; - sdhci@1253 { - bus-width = 4; - pinctrl-names = default; - pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus4; - status = okay; - }; + fixed-rate-clocks { + xxti { + compatible = samsung,clock-xxti; + clock-frequency = 1200; + }; - g2d@1280 { - status = okay; + xusbxti { + compatible = samsung,clock-xusbxti; + clock-frequency = 2400; + }; }; +}; - codec@1340 { - samsung,mfc-r = 0x4300 0x80; - samsung,mfc-l = 0x5100 0x80; - status = okay; - }; +g2d { + status = okay; +}; - serial@1380 { - status = okay; - }; +i2c_0 { + #address-cells = 1; + #size-cells = 0; + samsung,i2c-sda-delay = 100; + samsung,i2c-max-bus-freq = 10; + status = okay; - serial@1381 { - status = okay; + eeprom@50 { + compatible = samsung,24ad0xd1; + reg = 0x50; }; - serial@1382 { - status = okay; + eeprom@52 { + compatible = samsung,24ad0xd1; + reg = 0x52; }; +}; - serial@1383 { - status = okay; +keypad { + samsung,keypad-num-rows = 2; + samsung,keypad-num-columns = 8; + linux,keypad-no-autorepeat; + linux,keypad-wakeup; + pinctrl-names = default; + pinctrl-0 = keypad_rows keypad_cols; + status = okay; + + key_1 { + keypad,row = 0; + keypad,column = 3; + linux,code = 2; }; - pinctrl@1100 { - keypad_rows: keypad-rows { - samsung,pins = gpx2-0, gpx2-1; - samsung,pin-function = 3; - samsung,pin-pud = 3; - samsung,pin-drv = 0; - }; - - keypad_cols: keypad-cols { - samsung,pins = gpx1-0, gpx1-1, gpx1-2, gpx1-3, - gpx1-4, gpx1-5, gpx1-6, gpx1-7; - samsung,pin-function = 3; - samsung,pin-pud = 0; - samsung,pin-drv = 0; - }; + key_2 { + keypad,row = 0; + keypad,column = 4; + linux,code = 3; }; - keypad@100A { - samsung,keypad-num-rows = 2; - samsung,keypad-num-columns = 8; - linux,keypad-no-autorepeat; - linux,keypad-wakeup; - pinctrl-names = default; - pinctrl-0 = keypad_rows keypad_cols; - status = okay; + key_3 { + keypad,row = 0; + keypad,column = 5; + linux,code = 4; + }; - key_1 { - keypad,row = 0; - keypad,column = 3; - linux,code = 2; - }; + key_4 { + keypad,row = 0; + keypad,column = 6; + linux,code = 5; + }; - key_2 { - keypad,row = 0; - keypad,column = 4; - linux,code = 3; - }; + key_5 { + keypad,row = 0; + keypad,column = 7; + linux,code = 6; + }; - key_3 { - keypad,row = 0; - keypad,column = 5; - linux,code = 4; - }; + key_a { + keypad,row = 1; + keypad,column = 3; + linux,code = 30; + }; - key_4 { - keypad,row = 0; - keypad,column = 6; - linux,code = 5; - }; + key_b { + keypad,row = 1; + keypad,column = 4; + linux,code = 48; + }; - key_5 { - keypad,row = 0; - keypad,column = 7; - linux,code = 6; - }; + key_c { +
[PATCH v3 06/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4212
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4212.dtsi | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/exynos4212.dtsi b/arch/arm/boot/dts/exynos4212.dtsi index 5be03288f1ee..d9c8efeef208 100644 --- a/arch/arm/boot/dts/exynos4212.dtsi +++ b/arch/arm/boot/dts/exynos4212.dtsi @@ -41,12 +41,12 @@ reg = 0xA01; }; }; +}; - combiner: interrupt-controller@1044 { - samsung,combiner-nr = 18; - }; +combiner { + samsung,combiner-nr = 18; +}; - gic: interrupt-controller@1049 { - cpu-offset = 0x8000; - }; +gic { + cpu-offset = 0x8000; }; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 02/11] ARM: dts: exynos4: Use labels for overriding nodes in Exynos4210
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4210.dtsi | 43 +++ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 76b84852f29c..a9a55304e31a 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -52,16 +52,6 @@ }; }; - pmu_system_controller: system-controller@1002 { - clock-names = clkout0, clkout1, clkout2, clkout3, - clkout4, clkout8, clkout9; - clocks = clock CLK_OUT_DMC, clock CLK_OUT_TOP, - clock CLK_OUT_LEFTBUS, clock CLK_OUT_RIGHTBUS, - clock CLK_OUT_CPU, clock CLK_XXTI, - clock CLK_XUSBXTI; - #clock-cells = 1; - }; - sysram: sysram@0202 { compatible = mmio-sram; reg = 0x0202 0x2; @@ -95,18 +85,6 @@ arm,data-latency = 2 2 1; }; - gic: interrupt-controller@1049 { - cpu-offset = 0x8000; - }; - - combiner: interrupt-controller@1044 { - samsung,combiner-nr = 16; - interrupts = 0 0 0, 0 1 0, 0 2 0, 0 3 0, -0 4 0, 0 5 0, 0 6 0, 0 7 0, -0 8 0, 0 9 0, 0 10 0, 0 11 0, -0 12 0, 0 13 0, 0 14 0, 0 15 0; - }; - mct: mct@1005 { compatible = samsung,exynos4210-mct; reg = 0x1005 0x800; @@ -245,3 +223,24 @@ status = disabled; }; }; + +gic { + cpu-offset = 0x8000; +}; + +combiner { + samsung,combiner-nr = 16; + interrupts = 0 0 0, 0 1 0, 0 2 0, 0 3 0, +0 4 0, 0 5 0, 0 6 0, 0 7 0, +0 8 0, 0 9 0, 0 10 0, 0 11 0, +0 12 0, 0 13 0, 0 14 0, 0 15 0; +}; + +pmu_system_controller { + clock-names = clkout0, clkout1, clkout2, clkout3, + clkout4, clkout8, clkout9; + clocks = clock CLK_OUT_DMC, clock CLK_OUT_TOP, + clock CLK_OUT_LEFTBUS, clock CLK_OUT_RIGHTBUS, + clock CLK_OUT_CPU, clock CLK_XXTI, clock CLK_XUSBXTI; + #clock-cells = 1; +}; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 05/11] ARM: dts: exynos4: Use labels for overriding nodes in Trats
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos4210-trats.dts | 592 - 1 file changed, 296 insertions(+), 296 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts index 32c5fd8f6269..98f3ce65cb9a 100644 --- a/arch/arm/boot/dts/exynos4210-trats.dts +++ b/arch/arm/boot/dts/exynos4210-trats.dts @@ -89,42 +89,6 @@ }; }; - hsotg@1248 { - vusb_d-supply = vusb_reg; - vusb_a-supply = vusbdac_reg; - dr_mode = peripheral; - status = okay; - }; - - sdhci_emmc: sdhci@1251 { - bus-width = 8; - non-removable; - pinctrl-0 = sd0_clk sd0_cmd sd0_bus8; - pinctrl-names = default; - vmmc-supply = vemmc_reg; - status = okay; - }; - - exynos-usbphy@125B { - status = okay; - }; - - serial@1380 { - status = okay; - }; - - serial@1381 { - status = okay; - }; - - serial@1382 { - status = okay; - }; - - serial@1383 { - status = okay; - }; - gpio-keys { compatible = gpio-keys; @@ -158,201 +122,6 @@ }; }; - i2c@1389 { - samsung,i2c-sda-delay = 100; - samsung,i2c-slave-addr = 0x10; - samsung,i2c-max-bus-freq = 40; - pinctrl-0 = i2c3_bus; - pinctrl-names = default; - status = okay; - - mms114-touchscreen@48 { - compatible = melfas,mms114; - reg = 0x48; - interrupt-parent = gpx0; - interrupts = 4 2; - x-size = 720; - y-size = 1280; - avdd-supply = tsp_reg; - vdd-supply = tsp_reg; - }; - }; - - i2c@138B { - samsung,i2c-sda-delay = 100; - samsung,i2c-slave-addr = 0x10; - samsung,i2c-max-bus-freq = 10; - pinctrl-0 = i2c5_bus; - pinctrl-names = default; - status = okay; - - max8997_pmic@66 { - compatible = maxim,max8997-pmic; - - reg = 0x66; - - max8997,pmic-buck1-uses-gpio-dvs; - max8997,pmic-buck2-uses-gpio-dvs; - max8997,pmic-buck5-uses-gpio-dvs; - - max8997,pmic-ignore-gpiodvs-side-effect; - max8997,pmic-buck125-default-dvs-idx = 0; - - max8997,pmic-buck125-dvs-gpios = gpx0 5 0, -gpx0 6 0, -gpl0 0 0; - - max8997,pmic-buck1-dvs-voltage = 135, 130, -125, 120, -115, 110, -100, 95; - - max8997,pmic-buck2-dvs-voltage = 110, 100, -95, 90, -110, 100, -95, 90; - - max8997,pmic-buck5-dvs-voltage = 120, 120, -120, 120, -120, 120, -120, 120; - - regulators { - valive_reg: LDO2 { -regulator-name = VALIVE_1.1V_C210; -regulator-min-microvolt = 110; -regulator-max-microvolt = 110; -regulator-always-on; - }; - - vusb_reg: LDO3 { -regulator-name = VUSB_1.1V_C210; -regulator-min-microvolt = 110; -regulator-max-microvolt = 110; - }; - - vmipi_reg: LDO4 { -regulator-name = VMIPI_1.8V; -regulator-min-microvolt = 180; -regulator-max-microvolt = 180; -
[PATCH v2 5/7] ARM: dts: exynos5: Use labels for overriding nodes in Exynos5420
Usage of labels instead of full paths reduces possible mistakes when overriding nodes. Additionally remove duplicated serial and uart labels for serial Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- arch/arm/boot/dts/exynos5420-peach-pit.dts | 2 +- arch/arm/boot/dts/exynos5420.dtsi | 80 +++--- arch/arm/boot/dts/exynos5800-peach-pi.dts | 2 +- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index 0788d08fb43e..d5921ffe1e0e 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -1026,7 +1026,7 @@ }; }; -uart_3 { +serial_3 { status = okay; }; diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index f67b23f303c3..0ba0004aae44 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -328,13 +328,6 @@ interrupts = 0 47 0; }; - rtc: rtc@101E { - clocks = clock CLK_RTC; - clock-names = rtc; - interrupt-parent = pmu_system_controller; - status = disabled; - }; - amba { #address-cells = 1; #size-cells = 1; @@ -496,26 +489,6 @@ status = disabled; }; - uart_0: serial@12C0 { - clocks = clock CLK_UART0, clock CLK_SCLK_UART0; - clock-names = uart, clk_uart_baud0; - }; - - uart_1: serial@12C1 { - clocks = clock CLK_UART1, clock CLK_SCLK_UART1; - clock-names = uart, clk_uart_baud0; - }; - - uart_2: serial@12C2 { - clocks = clock CLK_UART2, clock CLK_SCLK_UART2; - clock-names = uart, clk_uart_baud0; - }; - - uart_3: serial@12C3 { - clocks = clock CLK_UART3, clock CLK_SCLK_UART3; - clock-names = uart, clk_uart_baud0; - }; - pwm: pwm@12dd { compatible = samsung,exynos4210-pwm; reg = 0x12dd 0x100; @@ -531,13 +504,6 @@ #phy-cells = 0; }; - dp: dp-controller@145B { - clocks = clock CLK_DP1; - clock-names = dp; - phys = dp_phy; - phy-names = dp; - }; - mipi_phy: video-phy@10040714 { compatible = samsung,s5pv210-mipi-video-phy; reg = 0x10040714 12; @@ -557,12 +523,6 @@ status = disabled; }; - fimd: fimd@1440 { - clocks = clock CLK_SCLK_FIMD1, clock CLK_FIMD1; - clock-names = sclk_fimd, fimd; - power-domains = disp_pd; - }; - adc: adc@12D1 { compatible = samsung,exynos-adc-v2; reg = 0x12D1 0x100; @@ -962,3 +922,43 @@ samsung,pmureg-phandle = pmu_system_controller; }; }; + +dp { + clocks = clock CLK_DP1; + clock-names = dp; + phys = dp_phy; + phy-names = dp; +}; + +fimd { + clocks = clock CLK_SCLK_FIMD1, clock CLK_FIMD1; + clock-names = sclk_fimd, fimd; + power-domains = disp_pd; +}; + +rtc { + clocks = clock CLK_RTC; + clock-names = rtc; + interrupt-parent = pmu_system_controller; + status = disabled; +}; + +serial_0 { + clocks = clock CLK_UART0, clock CLK_SCLK_UART0; + clock-names = uart, clk_uart_baud0; +}; + +serial_1 { + clocks = clock CLK_UART1, clock CLK_SCLK_UART1; + clock-names = uart, clk_uart_baud0; +}; + +serial_2 { + clocks = clock CLK_UART2, clock CLK_SCLK_UART2; + clock-names = uart, clk_uart_baud0; +}; + +serial_3 { + clocks = clock CLK_UART3, clock CLK_SCLK_UART3; + clock-names = uart, clk_uart_baud0; +}; diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index 412f41d62686..3a1c46378460 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -989,7 +989,7 @@ }; }; -uart_3 { +serial_3 { status = okay; }; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] iio: magn: Add support for BMC150 magnetometer
Add support for the Bosh BMC150 Magnetometer. The specification can be downloaded from: http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf. The chip contains both an accelerometer and a magnetometer. This patch adds support only for the magnetometer part. The temperature compensation formulas are based on bmm050_api.c authored by cont...@bosch.sensortec.com. Signed-off-by: Irina Tirdea irina.tir...@intel.com --- drivers/iio/magnetometer/Kconfig | 14 + drivers/iio/magnetometer/Makefile |2 + drivers/iio/magnetometer/bmc150_magn.c | 1060 3 files changed, 1076 insertions(+) create mode 100644 drivers/iio/magnetometer/bmc150_magn.c diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig index a5d6de7..008baca 100644 --- a/drivers/iio/magnetometer/Kconfig +++ b/drivers/iio/magnetometer/Kconfig @@ -76,4 +76,18 @@ config IIO_ST_MAGN_SPI_3AXIS depends on IIO_ST_MAGN_3AXIS depends on IIO_ST_SENSORS_SPI +config BMC150_MAGN + tristate Bosch BMC150 Magnetometer Driver + depends on I2C + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER + help + Say yes here to build support for the BMC150 magnetometer. + + Currently this only supports the device via an i2c interface. + + This is a combo module with both accelerometer and magnetometer. + This driver is only implementing magnetometer part, which has + its own address and register map. + endmenu diff --git a/drivers/iio/magnetometer/Makefile b/drivers/iio/magnetometer/Makefile index 0f5d3c9..e2c3459 100644 --- a/drivers/iio/magnetometer/Makefile +++ b/drivers/iio/magnetometer/Makefile @@ -13,3 +13,5 @@ st_magn-$(CONFIG_IIO_BUFFER) += st_magn_buffer.o obj-$(CONFIG_IIO_ST_MAGN_I2C_3AXIS) += st_magn_i2c.o obj-$(CONFIG_IIO_ST_MAGN_SPI_3AXIS) += st_magn_spi.o + +obj-$(CONFIG_BMC150_MAGN) += bmc150_magn.o diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c new file mode 100644 index 000..e970a0c --- /dev/null +++ b/drivers/iio/magnetometer/bmc150_magn.c @@ -0,0 +1,1060 @@ +/* + * Bosch BMC150 three-axis magnetic field sensor driver + * + * Copyright (c) 2015, Intel Corporation. + * + * This code is based on bmm050_api.c authored by cont...@bosch.sensortec.com: + * + * (C) Copyright 2011~2014 Bosch Sensortec GmbH All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +#include linux/module.h +#include linux/i2c.h +#include linux/interrupt.h +#include linux/delay.h +#include linux/slab.h +#include linux/acpi.h +#include linux/gpio/consumer.h +#include linux/pm.h +#include linux/pm_runtime.h +#include linux/iio/iio.h +#include linux/iio/sysfs.h +#include linux/iio/buffer.h +#include linux/iio/events.h +#include linux/iio/trigger.h +#include linux/iio/trigger_consumer.h +#include linux/iio/triggered_buffer.h +#include linux/regmap.h + +#define BMC150_MAGN_DRV_NAME bmc150_magn +#define BMC150_MAGN_IRQ_NAME bmc150_magn_event +#define BMC150_MAGN_GPIO_INT interrupt + +#define BMC150_MAGN_REG_CHIP_ID0x40 +#define BMC150_MAGN_CHIP_ID_VAL0x32 + +#define BMC150_MAGN_REG_X_L0x42 +#define BMC150_MAGN_REG_X_M0x43 +#define BMC150_MAGN_REG_Y_L0x44 +#define BMC150_MAGN_REG_Y_M0x45 +#define BMC150_MAGN_SHIFT_XY_L 3 +#define BMC150_MAGN_REG_Z_L0x46 +#define BMC150_MAGN_REG_Z_M0x47 +#define BMC150_MAGN_SHIFT_Z_L 1 +#define BMC150_MAGN_REG_RHALL_L0x48 +#define BMC150_MAGN_REG_RHALL_M0x49 +#define BMC150_MAGN_SHIFT_RHALL_L 2 + +#define BMC150_MAGN_REG_INT_STATUS 0x4A + +#define BMC150_MAGN_REG_POWER 0x4B +#define BMC150_MAGN_MASK_POWER_CTL BIT(0) + +#define BMC150_MAGN_REG_OPMODE_ODR 0x4C +#define BMC150_MAGN_MASK_OPMODEGENMASK(2, 1) +#define BMC150_MAGN_SHIFT_OPMODE 1 +#define BMC150_MAGN_MODE_NORMAL0x00 +#define BMC150_MAGN_MODE_FORCED0x01 +#define BMC150_MAGN_MODE_SLEEP 0x03 +#define BMC150_MAGN_MASK_ODR GENMASK(5, 3) +#define BMC150_MAGN_SHIFT_ODR 3 + +#define BMC150_MAGN_REG_INT0x4D + +#define
[PATCH 3/5] MAINTAINERS: Add st_lpc.c to ARCH/STI section of maintainers
This patch adds the new st_lpc timer driver found on stih407 family SoCs into the ARCH/STI section of the maintainers file. Signed-off-by: Peter Griffin peter.grif...@linaro.org --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index efbcb50..4fe68dc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1465,6 +1465,7 @@ S:Maintained F: arch/arm/mach-sti/ F: arch/arm/boot/dts/sti* F: drivers/clocksource/arm_global_timer.c +F: drivers/clocksource/st_lpc.c F: drivers/i2c/busses/i2c-st.c F: drivers/media/rc/st_rc.c F: drivers/mmc/host/sdhci-st.c -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/5] clocksource: st_lpc: Add DT bindings documentation for lpc timer
This patch provides the DT bindings documentation for the lpc timer found on stih407 fanmily SoCs from STMicroelectronics. Signed-off-by: Peter Griffin peter.grif...@linaro.org --- Documentation/devicetree/bindings/timer/st,lpc-timer.txt | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/st,lpc-timer.txt diff --git a/Documentation/devicetree/bindings/timer/st,lpc-timer.txt b/Documentation/devicetree/bindings/timer/st,lpc-timer.txt new file mode 100644 index 000..c9ef297 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/st,lpc-timer.txt @@ -0,0 +1,15 @@ +Binding for LPC Timer on STMicroelectronics STi series SoCs + +Required properties: +- compatible: Should be st,st_lpc_timer +- reg: Base address and length of the LPC Timers registers. +- clock-names: Set to lpc_clk. +- clocks: phandle of the clock used by the LPC Timer + +Example: + lpc-timer@0x8788000 { + compatible = st,st_lpc_timer; + reg = 0x8788000 0x1000; + clock-names = lpc_clk; + clocks = clk_s_d3_flexgen CLK_LPC_1; + }; -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/3] Add support for BMC150 magnetometer
This adds support for Bosch BMC150 magnetometer. Irina Tirdea (3): iio: core: Introduce IIO_CHAN_INFO_CALIBREPETITIONS iio: magn: Add support for BMC150 magnetometer iio: magn: bmc150_magn: Add devicetree binding documentation Documentation/ABI/testing/sysfs-bus-iio| 10 + .../bindings/iio/magnetometer/bmc150_magn.txt | 20 + drivers/iio/industrialio-core.c|1 + drivers/iio/magnetometer/Kconfig | 14 + drivers/iio/magnetometer/Makefile |2 + drivers/iio/magnetometer/bmc150_magn.c | 1060 include/linux/iio/iio.h|1 + 7 files changed, 1108 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt create mode 100644 drivers/iio/magnetometer/bmc150_magn.c -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/5] ARM: DT: STi: STiH407: Add DT node for st-lpc timer.
This patch adds the dt node for the st-lpc timer found on stih407 famliy SoCs. This can then be used as a clocksource. Signed-off-by: Peter Griffin peter.grif...@linaro.org --- arch/arm/boot/dts/stih407-family.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi index c06a546..59c6a22 100644 --- a/arch/arm/boot/dts/stih407-family.dtsi +++ b/arch/arm/boot/dts/stih407-family.dtsi @@ -39,6 +39,13 @@ reg = 0x0876 0x1000; }; + lpc-timer@0x8788000 { + compatible = st,st_lpc_timer; + reg = 0x8788000 0x1000; + clock-names = lpc_clk; + clocks = clk_s_d3_flexgen CLK_LPC_1; + }; + timer@08760200 { interrupt-parent = intc; compatible = arm,cortex-a9-global-timer; -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/5] clocksource: st_lpc: Add LPC timer as a clocksource.
This patch adds support for the LPC timer as a clocksource which is found on stih407 family SoCs. We wish to use the LPC timer as a clocksource instead of arm_global_timer, as the latter is tied to CPU frequency, and that driver currently makes no account for frequency scaling. Once this driver is merged cpufreq can be enabled for stih407 family SoCs without also effecting sched_clock. Signed-off-by: Ajit Pal Singh ajitpal.si...@st.com Signed-off-by: Peter Griffin peter.grif...@linaro.org --- drivers/clocksource/Kconfig | 16 + drivers/clocksource/Makefile | 1 + drivers/clocksource/st_lpc.c | 154 +++ 3 files changed, 171 insertions(+) create mode 100644 drivers/clocksource/st_lpc.c diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index a0b036c..29cd67d 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -253,4 +253,20 @@ config CLKSRC_PXA help This enables OST0 support available on PXA and SA-11x0 platforms. + +config CLKSRC_ST_LPC_CLOCK + bool + depends on ARCH_STI + select CLKSRC_OF if OF + help + Enable this option to use the Low Power controller timer + as clock source. + +config CLKSRC_ST_LPC_TIMER_SCHED_CLOCK + bool + depends on ST_LPC_CLOCK + default y + help + Use Low Power controller timer clock source as sched_clock + endmenu diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile index 752d5c7..356d331 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile @@ -51,3 +51,4 @@ obj-$(CONFIG_ARCH_INTEGRATOR_AP) += timer-integrator-ap.o obj-$(CONFIG_CLKSRC_VERSATILE) += versatile.o obj-$(CONFIG_CLKSRC_MIPS_GIC) += mips-gic-timer.o obj-$(CONFIG_ASM9260_TIMER)+= asm9260_timer.o +obj-$(CONFIG_CLKSRC_ST_LPC_CLOCK) += st_lpc.o diff --git a/drivers/clocksource/st_lpc.c b/drivers/clocksource/st_lpc.c new file mode 100644 index 000..f9abded --- /dev/null +++ b/drivers/clocksource/st_lpc.c @@ -0,0 +1,154 @@ +/* + * This driver implements a Clocksource using the Low Power Timer in + * the Low Power Controller (LPC) in some STMicroelectronics + * STi series SoCs + * + * Copyright (C) 2015 STMicroelectronics Limited + * Author: Francesco Virlinzi francesco.virli...@st.com + * Author: Ajit Pal Singh ajitpal.si...@st.com + * + * May be copied or modified under the terms of the GNU General Public + * License. See linux/COPYING for more information. + */ + +#include linux/clk.h +#include linux/clocksource.h +#include linux/init.h +#include linux/of_address.h +#include linux/sched_clock.h +#include linux/slab.h + +/* Low Power Timer */ +#define LPC_LPT_LSB_OFF0x400 +#define LPC_LPT_MSB_OFF0x404 +#define LPC_LPT_START_OFF 0x408 + +struct st_lpc { + struct clk *clk; + void __iomem *iomem_cs; +}; + +static struct st_lpc *st_lpc; + +static u64 notrace st_lpc_counter_read(void) +{ + u64 counter; + u32 lower; + u32 upper, old_upper; + + upper = readl_relaxed(st_lpc-iomem_cs + LPC_LPT_MSB_OFF); + do { + old_upper = upper; + lower = readl_relaxed(st_lpc-iomem_cs + LPC_LPT_LSB_OFF); + upper = readl_relaxed(st_lpc-iomem_cs + LPC_LPT_MSB_OFF); + } while (upper != old_upper); + + counter = upper; + counter = 32; + counter |= lower; + return counter; +} + +static cycle_t st_lpc_clocksource_read(struct clocksource *cs) +{ + return st_lpc_counter_read(); +} + +static void st_lpc_clocksource_reset(struct clocksource *cs) +{ + writel_relaxed(0, st_lpc-iomem_cs + LPC_LPT_START_OFF); + writel_relaxed(0, st_lpc-iomem_cs + LPC_LPT_MSB_OFF); + writel_relaxed(0, st_lpc-iomem_cs + LPC_LPT_LSB_OFF); + writel_relaxed(1, st_lpc-iomem_cs + LPC_LPT_START_OFF); +} + +static struct clocksource st_lpc_clocksource = { + .name = st-lpc clocksource, + .rating = 301, + .read = st_lpc_clocksource_read, + .mask = CLOCKSOURCE_MASK(64), + .flags = CLOCK_SOURCE_IS_CONTINUOUS, +}; + +#ifdef CONFIG_CLKSRC_LPC_TIMER_SCHED_CLOCK +static u64 notrace st_lpc_sched_clock_read(void) +{ + return st_lpc_counter_read(); +} +#endif + +static void __init st_lpc_clocksource_init(void) +{ + unsigned long rate; + + st_lpc_clocksource_reset(st_lpc_clocksource); + + rate = clk_get_rate(st_lpc-clk); +#ifdef CONFIG_CLKSRC_LPC_TIMER_SCHED_CLOCK + sched_clock_register(st_lpc_sched_clock_read, 64, rate); +#endif + clocksource_register_hz(st_lpc_clocksource, rate); + +} + +static int st_lpc_setup_clk(struct device_node *np) +{ + char *clk_name = lpc_clk; + struct clk *clk; + int ret; + + clk = of_clk_get_by_name(np, clk_name); + if (IS_ERR(clk)) { + pr_err(st-lpc: unable to get lpc clock\n); +
[PATCH 4/5] ARM: sti: Always enable CLKSRC_ST_LPC_CLOCK
If available on the SoC we wish to use st_lpc clksrc so that cpufreq can operate without effecting sched_clock. Signed-off-by: Peter Griffin peter.grif...@linaro.org --- arch/arm/mach-sti/Kconfig | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig index 3b1ac46..48767d3 100644 --- a/arch/arm/mach-sti/Kconfig +++ b/arch/arm/mach-sti/Kconfig @@ -2,6 +2,7 @@ menuconfig ARCH_STI bool STMicroelectronics Consumer Electronics SOCs if ARCH_MULTI_V7 select ARM_GIC select ARM_GLOBAL_TIMER + select CLKSRC_ST_LPC_CLOCK select PINCTRL select PINCTRL_ST select MFD_SYSCON @@ -15,9 +16,9 @@ menuconfig ARCH_STI select PL310_ERRATA_769419 if CACHE_L2X0 select RESET_CONTROLLER help - Include support for STiH41x SOCs like STiH415/416 using the device tree - for discovery - More information at Documentation/arm/STiH41x and + Include support for STiH4xx SOCs like STiH415/416 and stih407/10 family + using the device tree for discovery + More information at Documentation/arm/sti/ and at Documentation/devicetree -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] iio: magn: bmc150_magn: Add devicetree binding documentation
Add binding documentation for Bosch BMC150 magnetometer. Signed-off-by: Irina Tirdea irina.tir...@intel.com --- .../bindings/iio/magnetometer/bmc150_magn.txt| 20 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt diff --git a/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt b/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt new file mode 100644 index 000..4ed035c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt @@ -0,0 +1,20 @@ +* Bosch BMC150 magnetometer sensor + +http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf + +Required properties: + + - compatible : should be bosch,bmc150_magn + - reg : the I2C address of the magnetometer + +Optional properties: + + - gpios : should be device tree identifier of the magnetometer DRDY pin + +Example: + +bmc150_magn@12 { +compatible = bosch,bmc150_magn; +reg = 0x12; +interrupt-gpio = gpio1 0 1; +}; -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] crypto: add new driver for Marvell CESA
Hey Boris, On Fri, Apr 17, 2015 at 10:39:46AM +0200, Boris Brezillon wrote: On Fri, 17 Apr 2015 10:33:56 +0200 Boris Brezillon boris.brezil...@free-electrons.com wrote: On Mon, 13 Apr 2015 20:11:46 + Jason Cooper ja...@lakedaemon.net wrote: I'd appreciate if we'd look into it. I understand from on-list and off-list discussion that the rewrite was unavoidable. So I'm willing to concede that. Giving people time to migrate from old to new while still being able to update for other security fixes seems reasonable. Jason, what do you think of the approach above? I say keep it simple. We shouldn't use the DT changes to trigger one vice the other. We need to be able to build both, but only load one at a time. If that's anything other than simple to do, then we make it a Kconfig binary choice and move on. Actually I was planning to handle it with a Kconfig dependency rule (NEW_DRIVER depends on !OLD_DRIVER and OLD_DRIVER depends on !NEW_DRIVER). I don't know how to make it a runtime check without adding new compatible strings for the kirkwood, dove and orion platforms, and I'm sure sure this is a good idea. ^ not Do you have any ideas ? I'm kinda wrapped up with dayjob stuff atm... But I'd look at the wireless drivers. eg b43, b43legacy, brcm80211. There are devices they overlap for. So, they need to deconflict in some way. thx, Jason. -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RESEND PATCH V2 0/2] Add OnKey support for DA9063
From: S Twiss stwiss.opensou...@diasemi.com This patch set adds OnKey driver support for the Dialog Semiconductor DA9063 PMIC. [PATCH V2 1/2]: kernel driver onkey support [PATCH V2 2/2]: device tree bindings document Thank you, Steve Twiss, Dialog Semiconductor Ltd. S Twiss (2): input: misc: da9063: OnKey driver devicetree: Add bindings for DA9063 OnKey Documentation/devicetree/bindings/mfd/da9063.txt | 22 ++- MAINTAINERS | 2 +- drivers/input/misc/Kconfig | 10 + drivers/input/misc/Makefile | 1 + drivers/input/misc/da9063-onkey.c| 228 +++ drivers/mfd/da9063-core.c| 55 ++ include/linux/mfd/da9063/pdata.h | 1 + 7 files changed, 316 insertions(+), 3 deletions(-) create mode 100644 drivers/input/misc/da9063-onkey.c -- end-of-patch for RESEND PATCH V2 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RESEND PATCH V2 2/2] devicetree: Add bindings for DA9063 OnKey
From: Steve Twiss stwiss.opensou...@diasemi.com Add device tree bindings for the DA9063 OnKey driver Signed-off-by: Steve Twiss stwiss.opensou...@diasemi.com --- Changes from PATCH V1 to V2 --- - Remove the circular dependency comment linking patches in the main e-mail - Search and replace 'keyword' with 'property' in onkey sub-node description - Reformat onkey sub-node content to move the description for disable-key-power into a new optional properties sub-section so it has a more promiment position This patch applies against linux-next and v4.0-rc6 Documentation/devicetree/bindings/mfd/da9063.txt | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/da9063.txt b/Documentation/devicetree/bindings/mfd/da9063.txt index 42c6fa6..c671784 100644 --- a/Documentation/devicetree/bindings/mfd/da9063.txt +++ b/Documentation/devicetree/bindings/mfd/da9063.txt @@ -2,9 +2,10 @@ DA9093 consists of a large and varied group of sub-devices (I2C Only): -Device Supply NamesDescription --- --- +Device Supply NamesDescription +-- --- da9063-regulator: : LDOs BUCKs +da9063-onkey: : On Key da9063-rtc : : Real-Time Clock da9063-watchdog : : Watchdog @@ -51,6 +52,18 @@ Sub-nodes: the DA9063. There are currently no entries in this binding, however compatible = dlg,da9063-rtc should be added if a node is created. +- onkey : This node defines the OnKey settings for controlling the key + functionality of the device. The node should contain the compatible property + with the value dlg,da9063-onkey. + + Optional onkey properties: + + - dlg,disable-key-power : Disable power-down using a long key-press. If this +entry exists the OnKey driver will remove support for the KEY_POWER key +press. If this entry does not exist then by default the key-press +triggered power down is enabled and the OnKey will support both KEY_POWER +and KEY_SLEEP. + - watchdog : This node defines settings for the Watchdog timer associated with the DA9063. There are currently no entries in this binding, however compatible = dlg,da9063-watchdog should be added if a node is created. @@ -73,6 +86,11 @@ Example: compatible = dlg,da9063-watchdog; }; + onkey { + compatible = dlg,da9063-onkey; + dlg,disable-key-power; + }; + regulators { DA9063_BCORE1: bcore1 { regulator-name = BCORE1; -- end-of-patch for RESEND PATCH V2 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RESEND PATCH V2 1/2] input: misc: da9063: OnKey driver
From: Steve Twiss stwiss.opensou...@diasemi.com Add OnKey driver support for DA9063 Signed-off-by: Steve Twiss stwiss.opensou...@diasemi.com --- Changes from PATCH V1 to V2 --- - Remove the circular dependency comment in the main e-mail body linking PATCH V1 1/2 and 2/2 - Alter the copyright header information to match expected GPLv2 text from http://www.gnu.org/licenses/gpl-2.0.html This patch applies against linux-next and v4.0-rc6 MAINTAINERS | 2 +- drivers/input/misc/Kconfig| 10 ++ drivers/input/misc/Makefile | 1 + drivers/input/misc/da9063-onkey.c | 228 ++ drivers/mfd/da9063-core.c | 55 + include/linux/mfd/da9063/pdata.h | 1 + 6 files changed, 296 insertions(+), 1 deletion(-) create mode 100644 drivers/input/misc/da9063-onkey.c diff --git a/MAINTAINERS b/MAINTAINERS index 1de6afa..97e20cf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3138,7 +3138,7 @@ S:Supported F: Documentation/hwmon/da90?? F: drivers/gpio/gpio-da90??.c F: drivers/hwmon/da90??-hwmon.c -F: drivers/input/misc/da90??_onkey.c +F: drivers/input/misc/da90???onkey.c F: drivers/input/touchscreen/da9052_tsi.c F: drivers/leds/leds-da90??.c F: drivers/mfd/da903x.c diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 6deb8da..9d7a79d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -586,6 +586,16 @@ config INPUT_DA9055_ONKEY To compile this driver as a module, choose M here: the module will be called da9055_onkey. +config INPUT_DA9063_ONKEY + tristate Dialog DA9063 OnKey + depends on MFD_DA9063 + help + Support the ONKEY of Dialog DA9063 Power Management IC as an + input device reporting power button statue. + + To compile this driver as a module, choose M here: the module + will be called da9063-onkey. + config INPUT_DM355EVM tristate TI DaVinci DM355 EVM Keypad and IR Remote depends on MFD_DM355EVM_MSP diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 403a1a5..50ae57e 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -25,6 +25,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS)+= cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o +obj-$(CONFIG_INPUT_DA9063_ONKEY) += da9063-onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o obj-$(CONFIG_INPUT_E3X0_BUTTON)+= e3x0-button.o obj-$(CONFIG_INPUT_DRV260X_HAPTICS)+= drv260x.o diff --git a/drivers/input/misc/da9063-onkey.c b/drivers/input/misc/da9063-onkey.c new file mode 100644 index 000..9e41a2d --- /dev/null +++ b/drivers/input/misc/da9063-onkey.c @@ -0,0 +1,228 @@ +/* + * da9063-onkey.c - Onkey device driver for DA9063 + * Copyright (C) 2015 Dialog Semiconductor Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/module.h +#include linux/errno.h +#include linux/input.h +#include linux/interrupt.h +#include linux/platform_device.h +#include linux/workqueue.h +#include linux/regmap.h +#include linux/of.h +#include linux/mfd/da9063/core.h +#include linux/mfd/da9063/pdata.h +#include linux/mfd/da9063/registers.h + +struct da9063_onkey { + struct da9063 *hw; + struct delayed_work work; + struct input_dev *input; + int irq; + bool key_power; +}; + +static void da9063_poll_on(struct work_struct *work) +{ + struct da9063_onkey *onkey = container_of(work, struct da9063_onkey, + work.work); + unsigned int val; + int fault_log = 0; + bool poll = true; + int ret; + + /* poll to see when the pin is released */ + ret = regmap_read(onkey-hw-regmap, DA9063_REG_STATUS_A, val); + if (ret 0) { + dev_err(onkey-input-dev, + Failed to read ON status: %d\n, ret); + goto err_poll; + } + + if (!(val DA9063_NONKEY)) { + ret = regmap_update_bits(onkey-hw-regmap, +DA9063_REG_CONTROL_B, +DA9063_NONKEY_LOCK, 0); + if (ret 0) { + dev_err(onkey-input-dev, +
Re: AM335x OMAP2 common clock external fixed-clock registration
On Fri, Apr 17, 2015 at 11:12:03AM +0200, Sebastian Hesselbarth wrote: On 17.04.2015 04:00, Michael Welling wrote: On Fri, Apr 17, 2015 at 01:23:50AM +0200, Sebastian Hesselbarth wrote: On 17.04.2015 00:09, Michael Welling wrote: On Thu, Apr 16, 2015 at 10:37:19PM +0200, Sebastian Hesselbarth wrote: On 16.04.2015 18:17, Michael Welling wrote: [...] What would be the proper error path? What cleanup is required? A proper error path would be to release any claimed resource on any error. If you look at the code, the only resources that need to be released are the two clocks in question. So for every error return in the probe function and in the of si5351_dt_parse it needs to clk_put first right? Not quite. The driver should clk_put() every clock that it called a [of_]clk_get() for. The thing is that clocks can be passed by platform_data and we never claim them. I've always said clocks (as in struct clk) should never be passed through platform data. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] iio: core: Introduce IIO_CHAN_INFO_CALIBREPETITIONS
Some magnetometers can perform a number of repetitions in HW for each measurement to increase accuracy. One example is Bosch BMC150: http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf. Introduce an interface to set the number of repetitions for these devices. Signed-off-by: Irina Tirdea irina.tir...@intel.com --- Documentation/ABI/testing/sysfs-bus-iio | 10 ++ drivers/iio/industrialio-core.c | 1 + include/linux/iio/iio.h | 1 + 3 files changed, 12 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 866b4ec..74c1444 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1375,3 +1375,13 @@ Description: The emissivity ratio of the surface in the field of view of the contactless temperature sensor. Emissivity varies from 0 to 1, with 1 being the emissivity of a black body. + +What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_calibrepetitions +What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_calibrepetitions +What: /sys/bus/iio/devices/iio:deviceX/in_magn_z_calibrepetitions +KernelVersion: 4.2 +Contact: linux-...@vger.kernel.org +Description: + Hardware applied number of repetitions for acquiring one + data point. The HW will do type[_name]_calibrepetitions + measurements and return the average value as output data. diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 7c98bc1..9e0da7f 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -129,6 +129,7 @@ static const char * const iio_chan_info_postfix[] = { [IIO_CHAN_INFO_DEBOUNCE_COUNT] = debounce_count, [IIO_CHAN_INFO_DEBOUNCE_TIME] = debounce_time, [IIO_CHAN_INFO_CALIBEMISSIVITY] = calibemissivity, + [IIO_CHAN_INFO_CALIBREPETITIONS] = calibrepetitions, }; /** diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index b1e46ae..07fbfb2 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@ -44,6 +44,7 @@ enum iio_chan_info_enum { IIO_CHAN_INFO_DEBOUNCE_COUNT, IIO_CHAN_INFO_DEBOUNCE_TIME, IIO_CHAN_INFO_CALIBEMISSIVITY, + IIO_CHAN_INFO_CALIBREPETITIONS, }; enum iio_shared_by { -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
LED subsystem child DT node ref counting
Hi, I'd like to clarify whether LED subsystem drivers behave correctly or not, regarding child DT nodes reference counting. Single LED controller can have connected more then one LED to it. The LEDs are represented by child DT nodes of the node representing the controller (see Documentation/devicetree/bindings/leds). LED subsystem drivers parse child DT nodes and use the node name, or 'label' property string as the LED class device name. This is usually accomplished like below: for_each_child_of_node(np, child) { ... led.name = of_get_property(child, label, NULL) ? : child-name; The question is whether reference count of the child node shouldn't be increased here with of_node_get(child). Whereas intuitively it could be thought of as a right thing to do, empirical experiments don't necessary confirm that. When I print the value of child_node-kobj.kref.refcount.counter inside for_each loop it is 3 and and after leaving the loop it gets decreased to 2. On driver removal the value is also 2. It means that label is available all the time, without increasing child node ref counter. I'd like to ask if this is guaranteed to be always true. -- Best Regards, Jacek Anaszewski -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC/PATCH v2 1/5] ARM: cpuidle: Add cpuidle support for R-Car Gen2 series
Hi Kobayashi-san, On Thu, Apr 16, 2015 at 7:35 PM, Keita Kobayashi keita.kobayashi...@renesas.com wrote: Define ARM_RCAR_CPUIDLE config item to enable cpuidle support for Renesas R-Car Gen2 SoCs. Signed-off-by: Keita Kobayashi keita.kobayashi...@renesas.com --- drivers/cpuidle/Kconfig.arm | 8 1 file changed, 8 insertions(+) diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm index 21340e0..1bff62e 100644 --- a/drivers/cpuidle/Kconfig.arm +++ b/drivers/cpuidle/Kconfig.arm @@ -74,3 +74,11 @@ config ARM_MVEBU_V7_CPUIDLE depends on ARCH_MVEBU !ARM64 help Select this to enable cpuidle on Armada 370, 38x and XP processors. + +config ARM_RCAR_CPUIDLE + bool CPU Idle Driver for the R-Car SoCs + depends on ARCH_RCAR_GEN2 + depends on ARM_CPUIDLE + select ARM_CPU_SUSPEND + help + Select this to enable cpuidle for R-Car SoCs Thanks for your efforts. May I ask why we need a separate Kconfig entry for this portion? It looks a bit overkill to me. I have not tried this myself, but it seems to me that you could simply modify arch/arm/mach-shmobile/Kconfig something like this: config ARCH_RCAR_GEN2 bool select PM_RCAR if PM || SMP + select ARM_CPU_SUSPEND if ARM_CPUIDLE select RENESAS_IRQC and then in patch 2/5 use ARM_CPUIDLE for the #ifdefs instead of ARM_RCAR_CPUIDLE. I think that would simplify things if possible. Thanks, / magnus -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/5] Add st_lpc clocksource timer driver.
Hi, Following on from the discussion here https://www.mail-archive.com/devicetree@vger.kernel.org/msg68857.html This series adds the st_lpc clocksource driver found on stih407 family silicon. Regardless of whether the change referenced above actually gets merged, adding this alternative clocksource driver is useful so that we can activate cpufreq upstream on stih407 family. regards, Peter. Peter Griffin (5): clocksource: st_lpc: Add LPC timer as a clocksource. clocksource: st_lpc: Add DT bindings documentation for lpc timer MAINTAINERS: Add st_lpc.c to ARCH/STI section of maintainers ARM: sti: Always enable CLKSRC_ST_LPC_CLOCK ARM: DT: STi: STiH407: Add DT node for st-lpc timer. .../devicetree/bindings/timer/st,lpc-timer.txt | 15 ++ MAINTAINERS| 1 + arch/arm/boot/dts/stih407-family.dtsi | 7 + arch/arm/mach-sti/Kconfig | 7 +- drivers/clocksource/Kconfig| 16 +++ drivers/clocksource/Makefile | 1 + drivers/clocksource/st_lpc.c | 154 + 7 files changed, 198 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/timer/st,lpc-timer.txt create mode 100644 drivers/clocksource/st_lpc.c -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 00/17] crypto: talitos - Add support for SEC1
The purpose of this set of patchs is to add to talitos crypto driver the support for the SEC1 version of the security engine, which is found in mpc885 and mpc8272 processors. v3 is a complete rework of the patchset. Since a kernel can be built with support for both MPC82xx and MPC83xx at the same time, talitos driver shall support both SEC1 and SEC2+ at the same time. Based on cryptodev-2.6 tree Christophe Leroy (17): crypto: talitos - Use zero entry to init descriptors ptrs to zero crypto: talitos - Refactor the sg in/out chain allocation crypto: talitos - talitos_ptr renamed ptr for more lisibility crypto: talitos - Add a helper function to clear j_extent field crypto: talitos - remove param 'extent' in map_single_talitos_ptr() crypto: talitos - helper function for ptr len crypto: talitos - enhanced talitos_desc struct for SEC1 crypto: talitos - add sub-choice in talitos CONFIG for SEC1 crypto: talitos - Add a feature to tag SEC1 crypto: talitos - fill in talitos descriptor iaw SEC1 or SEC2+ crypto: talitos - adaptation of talitos_submit() for SEC1 crypto: talitos - base address for Execution Units crypto: talitos - adapt interrupts and reset functions to SEC1 crypto: talitos - implement scatter/gather copy for SEC1 crypto: talitos - SEC1 bugs on 0 data hash crypto: talitos - Add fsl,sec1.0 compatible crypto: talitos - Update DT bindings with SEC1 .../devicetree/bindings/crypto/fsl-sec2.txt| 6 +- drivers/crypto/Kconfig | 18 + drivers/crypto/talitos.c | 727 +++-- drivers/crypto/talitos.h | 153 +++-- 4 files changed, 644 insertions(+), 260 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATH] MIPS: ath79: Add OF support and DTS for TL-WR1043ND
This series add OF bindings and code support for the interrupt controllers, clocks and GPIOs. However it was only tested on a TL-WR1043ND with an AR9132, others SoCs are untested, and a few are not supported at all. Most code changes base on the previous bug fix series: [PATH] MIPS: ath79: Various small fix to prepare OF support -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] crypto: add new driver for Marvell CESA
Hi Gregory, On Fri, 17 Apr 2015 15:01:01 +0200 Gregory CLEMENT gregory.clem...@free-electrons.com wrote: Hi Boris, On 17/04/2015 10:39, Boris Brezillon wrote: On Fri, 17 Apr 2015 10:33:56 +0200 Boris Brezillon boris.brezil...@free-electrons.com wrote: Hi Jason, On Mon, 13 Apr 2015 20:11:46 + Jason Cooper ja...@lakedaemon.net wrote: I'd appreciate if we'd look into it. I understand from on-list and off-list discussion that the rewrite was unavoidable. So I'm willing to concede that. Giving people time to migrate from old to new while still being able to update for other security fixes seems reasonable. Jason, what do you think of the approach above? I say keep it simple. We shouldn't use the DT changes to trigger one vice the other. We need to be able to build both, but only load one at a time. If that's anything other than simple to do, then we make it a Kconfig binary choice and move on. Actually I was planning to handle it with a Kconfig dependency rule (NEW_DRIVER depends on !OLD_DRIVER and OLD_DRIVER depends on !NEW_DRIVER). I don't know how to make it a runtime check without adding new compatible strings for the kirkwood, dove and orion platforms, and I'm sure sure this is a good idea. ^ not Do you have any ideas ? You use devm_ioremap_resource() in the new driver, so if the old one is already loaded the memory region will be already hold and the new driver will simply fail during the probe. So for this part it is OK. I like the idea :-). However, the old driver doesn't try to reserve the region, it directly uses an ioremap(). So if the new driver is loaded first, then the old one will manage to be loaded too. I think that just adding a request_region()/release_region() (or converting the ioremap in a devm_ioremap_resource() in the old driver would be enough. Absolutely. Unless someone is opposed to this solution I think I'll choose this solution. Thanks, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 17/17] crypto: talitos - Update DT bindings with SEC1
This patch updates the documentation by including SEC1 into SEC2/3 doc Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- Documentation/devicetree/bindings/crypto/fsl-sec2.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec2.txt b/Documentation/devicetree/bindings/crypto/fsl-sec2.txt index 38988ef..f0d926b 100644 --- a/Documentation/devicetree/bindings/crypto/fsl-sec2.txt +++ b/Documentation/devicetree/bindings/crypto/fsl-sec2.txt @@ -1,9 +1,11 @@ -Freescale SoC SEC Security Engines versions 2.x-3.x +Freescale SoC SEC Security Engines versions 1.x-2.x-3.x Required properties: - compatible : Should contain entries for this and backward compatible - SEC versions, high to low, e.g., fsl,sec2.1, fsl,sec2.0 + SEC versions, high to low, e.g., fsl,sec2.1, fsl,sec2.0 (SEC2/3) + e.g., fsl,sec1.2, fsl,sec1.0 (SEC1) +warning: SEC1 and SEC2 are mutually exclusive - reg : Offset and length of the register set for the device - interrupts : the SEC's interrupt number - fsl,num-channels : An integer representing the number of channels -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 06/14] MIPS: ath79: Add OF support to the IRQ controllers
Add OF support for the CPU and MISC interrupt controllers of most supported ATH79 devices. Signed-off-by: Alban Bedel al...@free.fr --- arch/mips/ath79/irq.c | 87 ++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c index 2c3991a..afb0096 100644 --- a/arch/mips/ath79/irq.c +++ b/arch/mips/ath79/irq.c @@ -15,7 +15,9 @@ #include linux/kernel.h #include linux/init.h #include linux/interrupt.h -#include linux/irq.h +#include linux/irqchip.h +#include linux/of_irq.h +#include ../../../drivers/irqchip/irqchip.h #include asm/irq_cpu.h #include asm/mipsregs.h @@ -23,6 +25,7 @@ #include asm/mach-ath79/ath79.h #include asm/mach-ath79/ar71xx_regs.h #include common.h +#include machtypes.h static void ath79_misc_irq_handler(unsigned int irq, struct irq_desc *desc) { @@ -268,8 +271,90 @@ asmlinkage void plat_irq_dispatch(void) } } +#ifdef CONFIG_IRQCHIP +static int misc_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw) +{ + irq_set_chip_and_handler(irq, ath79_misc_irq_chip, handle_level_irq); + return 0; +} + +static const struct irq_domain_ops misc_irq_domain_ops = { + .xlate = irq_domain_xlate_onecell, + .map = misc_map, +}; + +static int __init ath79_misc_intc_of_init( + struct device_node *node, struct device_node *parent) +{ + void __iomem *base = ath79_reset_base; + struct irq_domain *domain; + int irq; + + irq = irq_of_parse_and_map(node, 0); + if (!irq) + panic(Failed to get MISC IRQ); + + domain = irq_domain_add_legacy(node, ATH79_MISC_IRQ_COUNT, + ATH79_MISC_IRQ_BASE, 0, misc_irq_domain_ops, NULL); + if (!domain) + panic(Failed to add MISC irqdomain); + + /* Disable and clear all interrupts */ + __raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE); + __raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS); + + + irq_set_chained_handler(irq, ath79_misc_irq_handler); + + return 0; +} +IRQCHIP_DECLARE(ath79_misc_intc, qca,ar7100-misc-intc, + ath79_misc_intc_of_init); + +static int __init ar79_cpu_intc_of_init( + struct device_node *node, struct device_node *parent) +{ + int err, i, count; + + /* Fill the irq_wb_chan table */ + count = of_count_phandle_with_args( + node, qca,ddr-wb-channels, #qca,ddr-wb-channel-cells); + + for (i = 0; i count; i++) { + struct of_phandle_args args; + u32 irq = i; + + of_property_read_u32_index( + node, qca,ddr-wb-channel-interrupts, i, irq); + if (irq = ARRAY_SIZE(irq_wb_chan)) + continue; + + err = of_parse_phandle_with_args( + node, qca,ddr-wb-channels, + #qca,ddr-wb-channel-cells, + i, args); + if (err) + return err; + + irq_wb_chan[irq] = args.args[0]; + pr_info(IRQ: Set flush channel of IRQ%d to %d\n, + irq, args.args[0]); + } + + return mips_cpu_irq_of_init(node, parent); +} +IRQCHIP_DECLARE(ar79_cpu_intc, qca,ar7100-cpu-intc, + ar79_cpu_intc_of_init); + +#endif + void __init arch_init_irq(void) { + if (mips_machtype == ATH79_MACH_GENERIC_OF) { + irqchip_init(); + return; + } + if (soc_is_ar71xx() || soc_is_ar724x() || soc_is_ar913x() || soc_is_ar933x()) { irq_wb_chan[2] = 3; -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 11/14] MIPS: ath79: Add OF support to the GPIO driver
Replace the simple GPIO chip registration by a platform driver and make ath79_gpio_init() just register the device. Signed-off-by: Alban Bedel al...@free.fr --- arch/mips/ath79/dev-common.c | 13 arch/mips/ath79/gpio.c | 73 +--- 2 files changed, 81 insertions(+), 5 deletions(-) diff --git a/arch/mips/ath79/dev-common.c b/arch/mips/ath79/dev-common.c index 516225d..4f397cb 100644 --- a/arch/mips/ath79/dev-common.c +++ b/arch/mips/ath79/dev-common.c @@ -106,3 +106,16 @@ void __init ath79_register_wdt(void) platform_device_register_simple(ath79-wdt, -1, res, 1); } + +void __init ath79_gpio_init(void) +{ + struct resource res; + + memset(res, 0, sizeof(res)); + + res.flags = IORESOURCE_MEM; + res.start = AR71XX_GPIO_BASE; + res.end = res.start + AR71XX_GPIO_SIZE - 1; + + platform_device_register_simple(ath79-gpio, -1, res, 1); +} diff --git a/arch/mips/ath79/gpio.c b/arch/mips/ath79/gpio.c index 8d025b0..ce1a61d 100644 --- a/arch/mips/ath79/gpio.c +++ b/arch/mips/ath79/gpio.c @@ -20,6 +20,7 @@ #include linux/io.h #include linux/ioport.h #include linux/gpio.h +#include linux/of_device.h #include asm/mach-ath79/ar71xx_regs.h #include asm/mach-ath79/ath79.h @@ -178,11 +179,52 @@ void ath79_gpio_function_disable(u32 mask) ath79_gpio_function_setup(0, mask); } -void __init ath79_gpio_init(void) +static const struct of_device_id ath79_gpio_of_match[] = { + { + .compatible = qca,ar7100-gpio, + .data = (void *)AR71XX_GPIO_COUNT, + }, + { + .compatible = qca,ar7240-gpio, + .data = (void *)AR7240_GPIO_COUNT, + }, + { + .compatible = qca,ar7241-gpio, + .data = (void *)AR7241_GPIO_COUNT, + }, + { + .compatible = qca,ar9130-gpio, + .data = (void *)AR913X_GPIO_COUNT, + }, + { + .compatible = qca,ar9330-gpio, + .data = (void *)AR933X_GPIO_COUNT, + }, + { + .compatible = qca,ar9340-gpio, + .data = (void *)AR934X_GPIO_COUNT, + }, + { + .compatible = qca,qca9550-gpio, + .data = (void *)QCA955X_GPIO_COUNT, + }, + {}, +}; + +static int ath79_gpio_probe(struct platform_device *pdev) { + struct resource *res; int err; - if (soc_is_ar71xx()) + if (pdev-dev.of_node) { + const struct of_device_id *of_id = + of_match_device(ath79_gpio_of_match, pdev-dev); + if (!of_id) { + dev_err(pdev-dev, Error: No device match found\n); + return -ENODEV; + } + ath79_gpio_count = (unsigned long)of_id-data; + } else if (soc_is_ar71xx()) ath79_gpio_count = AR71XX_GPIO_COUNT; else if (soc_is_ar7240()) ath79_gpio_count = AR7240_GPIO_COUNT; @@ -199,7 +241,13 @@ void __init ath79_gpio_init(void) else BUG(); - ath79_gpio_base = ioremap_nocache(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + ath79_gpio_base = devm_ioremap_nocache( + pdev-dev, res-start, resource_size(res)); + if (!ath79_gpio_base) + return -ENOMEM; + + ath79_gpio_chip.dev = pdev-dev; ath79_gpio_chip.ngpio = ath79_gpio_count; if (soc_is_ar934x() || soc_is_qca955x()) { ath79_gpio_chip.direction_input = ar934x_gpio_direction_input; @@ -207,10 +255,25 @@ void __init ath79_gpio_init(void) } err = gpiochip_add(ath79_gpio_chip); - if (err) - panic(cannot add AR71xx GPIO chip, error=%d, err); + if (err) { + dev_err(pdev-dev, + cannot add AR71xx GPIO chip, error=%d, err); + return err; + } + + return 0; } +static struct platform_driver ath79_gpio_driver = { + .driver = { + .name = ath79-gpio, + .of_match_table = ath79_gpio_of_match, + }, + .probe = ath79_gpio_probe, +}; + +module_platform_driver(ath79_gpio_driver); + int gpio_get_value(unsigned gpio) { if (gpio ath79_gpio_count) -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 09/14] MIPS: ath79: Add OF support to the clocks
Allow using the SoC clocks in the device tree. Signed-off-by: Alban Bedel al...@free.fr --- arch/mips/ath79/clock.c | 63 ++--- 1 file changed, 44 insertions(+), 19 deletions(-) diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c index 1fcb691..682bf61 100644 --- a/arch/mips/ath79/clock.c +++ b/arch/mips/ath79/clock.c @@ -29,7 +29,14 @@ #define AR724X_BASE_FREQ 500 #define AR913X_BASE_FREQ 500 -static void __init ath79_add_sys_clkdev(const char *id, unsigned long rate) +static struct clk *clks[3]; +static struct clk_onecell_data clk_data = { + .clks = clks, + .clk_num = ARRAY_SIZE(clks), +}; + +static struct clk *__init ath79_add_sys_clkdev( + const char *id, unsigned long rate) { struct clk *clk; int err; @@ -41,6 +48,8 @@ static void __init ath79_add_sys_clkdev(const char *id, unsigned long rate) err = clk_register_clkdev(clk, id, NULL); if (err) panic(unable to register %s clock device, id); + + return clk; } static void __init ar71xx_clocks_init(void) @@ -70,9 +79,9 @@ static void __init ar71xx_clocks_init(void) ahb_rate = cpu_rate / div; ath79_add_sys_clkdev(ref, ref_rate); - ath79_add_sys_clkdev(cpu, cpu_rate); - ath79_add_sys_clkdev(ddr, ddr_rate); - ath79_add_sys_clkdev(ahb, ahb_rate); + clks[0] = ath79_add_sys_clkdev(cpu, cpu_rate); + clks[1] = ath79_add_sys_clkdev(ddr, ddr_rate); + clks[2] = ath79_add_sys_clkdev(ahb, ahb_rate); clk_add_alias(wdt, NULL, ahb, NULL); clk_add_alias(uart, NULL, ahb, NULL); @@ -106,9 +115,9 @@ static void __init ar724x_clocks_init(void) ahb_rate = cpu_rate / div; ath79_add_sys_clkdev(ref, ref_rate); - ath79_add_sys_clkdev(cpu, cpu_rate); - ath79_add_sys_clkdev(ddr, ddr_rate); - ath79_add_sys_clkdev(ahb, ahb_rate); + clks[0] = ath79_add_sys_clkdev(cpu, cpu_rate); + clks[1] = ath79_add_sys_clkdev(ddr, ddr_rate); + clks[2] = ath79_add_sys_clkdev(ahb, ahb_rate); clk_add_alias(wdt, NULL, ahb, NULL); clk_add_alias(uart, NULL, ahb, NULL); @@ -139,9 +148,9 @@ static void __init ar913x_clocks_init(void) ahb_rate = cpu_rate / div; ath79_add_sys_clkdev(ref, ref_rate); - ath79_add_sys_clkdev(cpu, cpu_rate); - ath79_add_sys_clkdev(ddr, ddr_rate); - ath79_add_sys_clkdev(ahb, ahb_rate); + clks[0] = ath79_add_sys_clkdev(cpu, cpu_rate); + clks[1] = ath79_add_sys_clkdev(ddr, ddr_rate); + clks[2] = ath79_add_sys_clkdev(ahb, ahb_rate); clk_add_alias(wdt, NULL, ahb, NULL); clk_add_alias(uart, NULL, ahb, NULL); @@ -201,9 +210,9 @@ static void __init ar933x_clocks_init(void) } ath79_add_sys_clkdev(ref, ref_rate); - ath79_add_sys_clkdev(cpu, cpu_rate); - ath79_add_sys_clkdev(ddr, ddr_rate); - ath79_add_sys_clkdev(ahb, ahb_rate); + clks[0] = ath79_add_sys_clkdev(cpu, cpu_rate); + clks[1] = ath79_add_sys_clkdev(ddr, ddr_rate); + clks[2] = ath79_add_sys_clkdev(ahb, ahb_rate); clk_add_alias(wdt, NULL, ahb, NULL); clk_add_alias(uart, NULL, ref, NULL); @@ -335,9 +344,9 @@ static void __init ar934x_clocks_init(void) ahb_rate = cpu_pll / (postdiv + 1); ath79_add_sys_clkdev(ref, ref_rate); - ath79_add_sys_clkdev(cpu, cpu_rate); - ath79_add_sys_clkdev(ddr, ddr_rate); - ath79_add_sys_clkdev(ahb, ahb_rate); + clks[0] = ath79_add_sys_clkdev(cpu, cpu_rate); + clks[1] = ath79_add_sys_clkdev(ddr, ddr_rate); + clks[2] = ath79_add_sys_clkdev(ahb, ahb_rate); clk_add_alias(wdt, NULL, ref, NULL); clk_add_alias(uart, NULL, ref, NULL); @@ -422,9 +431,9 @@ static void __init qca955x_clocks_init(void) ahb_rate = cpu_pll / (postdiv + 1); ath79_add_sys_clkdev(ref, ref_rate); - ath79_add_sys_clkdev(cpu, cpu_rate); - ath79_add_sys_clkdev(ddr, ddr_rate); - ath79_add_sys_clkdev(ahb, ahb_rate); + clks[0] = ath79_add_sys_clkdev(cpu, cpu_rate); + clks[1] = ath79_add_sys_clkdev(ddr, ddr_rate); + clks[2] = ath79_add_sys_clkdev(ahb, ahb_rate); clk_add_alias(wdt, NULL, ref, NULL); clk_add_alias(uart, NULL, ref, NULL); @@ -446,6 +455,8 @@ void __init ath79_clocks_init(void) qca955x_clocks_init(); else BUG(); + + of_clk_init(NULL); } unsigned long __init @@ -463,3 +474,17 @@ ath79_get_sys_clk_rate(const char *id) return rate; } + +#ifdef CONFIG_OF +static void __init ath79_clocks_init_dt(struct device_node *np) +{ + of_clk_add_provider(np, of_clk_src_onecell_get, clk_data); +} + +CLK_OF_DECLARE(ar7100, qca,ar7100-pll, ath79_clocks_init_dt); +CLK_OF_DECLARE(ar7240, qca,ar7240-pll, ath79_clocks_init_dt); +CLK_OF_DECLARE(ar9130, qca,ar9130-pll, ath79_clocks_init_dt);
[PATCH 02/14] MIPS: ath79: Add basic device tree support
Add the bare minimum to load a device tree. Signed-off-by: Alban Bedel al...@free.fr --- arch/mips/Kconfig | 1 + arch/mips/ath79/Kconfig | 10 ++ arch/mips/ath79/machtypes.h | 1 + arch/mips/ath79/setup.c | 27 ++- 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index cc7f262..1fa7f2f 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -129,6 +129,7 @@ config ATH79 select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_MIPS16 select SYS_SUPPORTS_ZBOOT + select USE_OF help Support for the Atheros AR71XX/AR724X/AR913X SoCs. diff --git a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig index dfc6020..1d38c6a 100644 --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig @@ -71,6 +71,16 @@ config ATH79_MACH_UBNT_XM Say 'Y' here if you want your kernel to support the Ubiquiti Networks XM (rev 1.0) board. +choice + prompt Builtin devicetree selection + default DTB_ATH79_NONE + help + Select the devicetree. + + config DTB_ATH79_NONE + bool None +endchoice + endmenu config SOC_AR71XX diff --git a/arch/mips/ath79/machtypes.h b/arch/mips/ath79/machtypes.h index 2625405..a13db3d 100644 --- a/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h @@ -15,6 +15,7 @@ #include asm/mips_machine.h enum ath79_mach_type { + ATH79_MACH_GENERIC_OF = -1, /* Device tree board */ ATH79_MACH_GENERIC = 0, ATH79_MACH_AP121, /* Atheros AP121 reference board */ ATH79_MACH_AP136_010, /* Atheros AP136-010 reference board */ diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index 74f1af7..01a644f 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c @@ -17,12 +17,16 @@ #include linux/bootmem.h #include linux/err.h #include linux/clk.h +#include linux/of_platform.h +#include linux/of_fdt.h #include asm/bootinfo.h #include asm/idle.h #include asm/time.h /* for mips_hpt_frequency */ #include asm/reboot.h/* for _machine_{restart,halt} */ #include asm/mips_machine.h +#include asm/prom.h +#include asm/fw/fw.h #include asm/mach-ath79/ath79.h #include asm/mach-ath79/ar71xx_regs.h @@ -194,8 +198,19 @@ unsigned int get_c0_compare_int(void) void __init plat_mem_setup(void) { + unsigned long fdt_start; + set_io_port_base(KSEG1); + /* Get the position of the FDT passed by the bootloader */ + fdt_start = fw_getenvl(fdt_start); + if (fdt_start) + __dt_setup_arch((void *)KSEG0ADDR(fdt_start)); +#ifdef CONFIG_BUILTIN_DTB + else + __dt_setup_arch(__dtb_start); +#endif + ath79_reset_base = ioremap_nocache(AR71XX_RESET_BASE, AR71XX_RESET_SIZE); ath79_pll_base = ioremap_nocache(AR71XX_PLL_BASE, @@ -203,7 +218,8 @@ void __init plat_mem_setup(void) ath79_ddr_ctrl_init(); ath79_detect_sys_type(); - detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX); + if (mips_machtype != ATH79_MACH_GENERIC_OF) + detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX); _machine_restart = ath79_restart; _machine_halt = ath79_halt; @@ -235,6 +251,10 @@ void __init plat_time_init(void) static int __init ath79_setup(void) { + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + if (mips_machtype == ATH79_MACH_GENERIC_OF) + return 0; + ath79_gpio_init(); ath79_register_uart(); ath79_register_wdt(); @@ -246,6 +266,11 @@ static int __init ath79_setup(void) arch_initcall(ath79_setup); +void __init device_tree_init(void) +{ + unflatten_and_copy_device_tree(); +} + static void __init ath79_generic_init(void) { /* Nothing to do */ -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe devicetree in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html