Re: [PATCH 3/3] ARM: dts: enable pinctrl for Broadcom NSP
Hi Linus, On 15-12-01 02:00 AM, Linus Walleij wrote: On Wed, Nov 25, 2015 at 1:08 AM, Florian Fainelli wrote: On 20/11/15 09:58, Yendapally Reddy Dhananjaya Reddy wrote: This enables the pinctrl support for Broadcom NSP SoC Signed-off-by: Yendapally Reddy Dhananjaya Reddy Looks like a sane pinctrl node here, unless there are objections, I would like to go ahead and apply this for v4.5, thanks! I'm waiting for an indication from the other BCM pinctrl maintainers to tell whether this SoC is unique enough to deserve its own driver. If Stephen Warren is the other maintainer you are talking about he does not work at Broadcom. I don't think he is familiar with the variety of pinctrl implementations present. But yes, the pinctrl implementations have been rather unique in these Socs. As Ray indicated we're trying to get the silicon designers to standardize more going forward so we don't have to create unique drivers for these SoCs. Yours, Linus Walleij Regards, Scott -- 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] ARM: dts: enable PCIe PHY support for Cygnus
Ray, Patch looks good. On 15-11-18 10:16 AM, Ray Jui wrote: Enable PCIe PHY for both PCIe root complexes on Cygnus Signed-off-by: Ray Jui Acked-by: Scott Branden --- arch/arm/boot/dts/bcm-cygnus.dtsi | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi index 2778533..5df5300 100644 --- a/arch/arm/boot/dts/bcm-cygnus.dtsi +++ b/arch/arm/boot/dts/bcm-cygnus.dtsi @@ -91,6 +91,21 @@ #address-cells = <1>; #size-cells = <1>; + pcie_phy: phy@0301d0a0 { + compatible = "brcm,cygnus-pcie-phy"; + reg = <0x0301d0a0 0x14>; + + pcie0_phy: phy@0 { + reg = <0>; + #phy-cells = <0>; + }; + + pcie1_phy: phy@1 { + reg = <1>; + #phy-cells = <0>; + }; + }; + pinctrl: pinctrl@0x0301d0c8 { compatible = "brcm,cygnus-pinmux"; reg = <0x0301d0c8 0x30>, @@ -161,6 +176,9 @@ ranges = <0x8100 0 0 0x2800 0 0x0001 0x8200 0 0x2000 0x2000 0 0x0400>; + phys = <&pcie0_phy>; + phy-names = "pcie-phy"; + status = "disabled"; }; @@ -182,6 +200,9 @@ ranges = <0x8100 0 0 0x4800 0 0x0001 0x8200 0 0x4000 0x4000 0 0x0400>; + phys = <&pcie1_phy>; + phy-names = "pcie-phy"; + status = "disabled"; }; -- 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 4/4] ARM: BCM: Add SMP support for Broadcom 4708
Hi Hauke, On 15-11-06 01:42 PM, Hauke Mehrtens wrote: On 11/06/2015 10:11 PM, Kapil Hali wrote: From: Jon Mason Add SMP support for Broadcom's 4708 SoCs. Signed-off-by: Jon Mason Acked-by: Hauke Mehrtens Tested-by: Hauke Mehrtens Signed-off-by: Kapil Hali I tested this on a Netgear R6250 V1 (BCM4708) and SMP worked. --- arch/arm/boot/dts/bcm4708.dtsi | 2 ++ arch/arm/mach-bcm/Kconfig | 1 + arch/arm/mach-bcm/Makefile | 3 +++ 3 files changed, 6 insertions(+) ... --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -54,6 +54,7 @@ config ARCH_BCM_NSP config ARCH_BCM_5301X bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7 select ARCH_BCM_IPROC You activated ARM_ERRATA_764369 for NSP is this not needed for NS? You would have to read the ARM CPU register and then compare to ARM Errata to see whether the Errata affects NS or not. + select HAVE_SMP help Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores. ... Regards, Scott -- 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 RESEND 1/4] dt-bindings: add SMP enable-method for Broadcom NSP
Hi Rob, On 15-11-05 12:48 PM, Rob Herring wrote: On Thu, Nov 05, 2015 at 12:51:18AM -0500, Kapil Hali wrote: Add a compatible string "brcm,bcm-nsp-smp" for Broadcom's Northstar Plus CPU to the 32-bit ARM CPU device tree binding documentation file and create a new binding documentation for Northstar Plus CPU pen-release mechanism. Signed-off-by: Kapil Hali --- .../bindings/arm/bcm/brcm,nsp-cpu-method.txt | 36 ++ Documentation/devicetree/bindings/arm/cpus.txt | 1 + 2 files changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/bcm/brcm,nsp-cpu-method.txt diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,nsp-cpu-method.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,nsp-cpu-method.txt new file mode 100644 index 000..8506da7 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,nsp-cpu-method.txt @@ -0,0 +1,36 @@ +Broadcom Northstar Plus SoC CPU Enable Method +- +This binding defines the enable method used for starting secondary +CPUs in the following Broadcom SoCs: + BCM58522, BCM58525, BCM58535, BCM58622, BCM58623, BCM58625, BCM88312 + +The enable method is specified by defining the following required +properties in the "cpus" device tree node: + - enable-method = "brcm,bcm-nsp-smp"; This is supposed to be per core. + - secondary-boot-reg = <...>; What happens with more than 2 cores? I'm pretty sure nothing - all of these SoCs have 1 or 2 cores. Regards, Scott -- 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 2/3] clk: bcm: Add BCM63138 clock support
Hi Florian, You should probably add COMPILE_TEST to increase compiler code coverage. On 15-10-23 10:30 AM, Florian Fainelli wrote: BCM63138 has a simple clocking domain which is primarily the ARMPLL clocking complex, from which the ARM (CPU), APB and AXI clocks would be derived from. Since the ARMPLL controller is entirely compatible with the iProc ARM PLL, we just initialize it without additional parameters. Signed-off-by: Florian Fainelli --- drivers/clk/bcm/Kconfig | 10 ++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm63xx.c | 22 ++ 3 files changed, 33 insertions(+) create mode 100644 drivers/clk/bcm/clk-bcm63xx.c diff --git a/drivers/clk/bcm/Kconfig b/drivers/clk/bcm/Kconfig index 85260fb96b36..eb4daed6aa56 100644 --- a/drivers/clk/bcm/Kconfig +++ b/drivers/clk/bcm/Kconfig @@ -1,3 +1,13 @@ +config CLK_BCM_63XX + bool "Broadcom BCM63xx clock support" + depends on ARCH_BCM_63XX || COMPILE_TEST + depends on COMMON_CLK + select COMMON_CLK_IPROC + default y + help + Enable common clock framework support for Broadcom BCM63xx DSL SoCs + based on the ARM architecture + config CLK_BCM_KONA bool "Broadcom Kona CCU clock support" depends on ARCH_BCM_MOBILE || COMPILE_TEST diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile index 3fc95060d875..247c26750d8b 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -1,3 +1,4 @@ +obj-$(CONFIG_CLK_BCM_63XX) += clk-bcm63xx.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-kona.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-kona-setup.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-bcm281xx.o diff --git a/drivers/clk/bcm/clk-bcm63xx.c b/drivers/clk/bcm/clk-bcm63xx.c new file mode 100644 index ..b7e0469d0522 --- /dev/null +++ b/drivers/clk/bcm/clk-bcm63xx.c @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2015 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#include +#include +#include +#include "clk-iproc.h" + +static void __init bcm63138_armpll_init(struct device_node *node) +{ + iproc_armpll_setup(node); +} +CLK_OF_DECLARE(bcm63138_armpll, "brcm,bcm63138-armpll", bcm63138_armpll_init); Regards, Scott -- 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 2/2] ARM: dts: bcm5301x: Add BCM SVK DT files
Hi Hauke, On 15-10-16 03:42 PM, Hauke Mehrtens wrote: On 10/17/2015 12:38 AM, Scott Branden wrote: Hi Jon, No need for the board in the compatible string. I think the board should be named here, so we could take some code branches based on the board, if it would have bad wiring for example. The device tree wiki says: "The first string in the list specifies the exact device that the node represents" http://devicetree.org/Device_Tree_Usage#Understanding_the_compatible_Property The exact device here is the board not the SoC. Thanks for link to understand this compatible string more. Hauke On 15-10-16 02:41 PM, Hauke Mehrtens wrote: On 10/16/2015 12:24 AM, Jon Mason wrote: Add device tree files for Broadcom Northstar based SVKs. Since the bcm5301x.dtsi already exists, all that is necessary is the dts files to enable the UARTs. With these files, the SVKs are able to boot to shell. Signed-off-by: Jon Mason Acked-by: Hauke Mehrtens Acked-by: Scott Branden --- arch/arm/boot/dts/Makefile | 5 +++- arch/arm/boot/dts/bcm94708.dts | 56 +++ arch/arm/boot/dts/bcm94709.dts | 56 +++ arch/arm/boot/dts/bcm953012k.dts | 63 4 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/bcm94708.dts create mode 100644 arch/arm/boot/dts/bcm94709.dts create mode 100644 arch/arm/boot/dts/bcm953012k.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 233159d..96a1b58 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -72,7 +72,10 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm47081-buffalo-wzr-900dhp.dtb \ bcm4709-asus-rt-ac87u.dtb \ bcm4709-buffalo-wxr-1900dhp.dtb \ -bcm4709-netgear-r8000.dtb +bcm4709-netgear-r8000.dtb \ +bcm94708.dtb \ +bcm94709.dtb \ +bcm953012k.dtb dtb-$(CONFIG_ARCH_BCM_63XX) += \ bcm963138dvt.dtb dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \ diff --git a/arch/arm/boot/dts/bcm94708.dts b/arch/arm/boot/dts/bcm94708.dts new file mode 100644 index 000..49682d6 --- /dev/null +++ b/arch/arm/boot/dts/bcm94708.dts @@ -0,0 +1,56 @@ +/* + * BSD LICENSE + * + * Copyright(c) 2015 Broadcom Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + ** Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + ** Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + ** Neither the name of Broadcom Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/dts-v1/; + +#include "bcm4708.dtsi" + +/ { +model = "NorthStar SVK (BCM94708)"; +compatible = "brcm,bcm94708", "brcm,bcm4708"; no need for brcm,bcm94708 + +aliases { +serial0 = &uart0; +}; + +chosen { +bootargs = "console=ttyS0,115200"; +}; + +memory { +reg = <0x 0x0800>; +}; +}; + +&uart0 { +status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm94709.dts b/arch/arm/boot/dts/bcm94709.dts new file mode 100644 index 000..4ab19c0 --- /dev/null +++ b/arch/arm/boot/dts/bcm94709.dts @@ -0,0 +1,56 @@ +/* + * BSD LICENSE + * + * Copyright(c) 2015 Broadcom Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + ** Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. +
Re: [PATCH v3 1/2] dt-bindings: Add new SoCs to bcm4708 DT bindings
On 15-10-16 02:42 PM, Hauke Mehrtens wrote: On 10/16/2015 12:24 AM, Jon Mason wrote: Add the 4708, 4709, and 53012 SoCs to the the documentation for the Broadcom Northstar device tree bindings. Signed-off-by: Jon Mason Acked-by: Hauke Mehrtens Acked-by: Scott Branden --- Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt index 6b0f49f..8608a77 100644 --- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt @@ -5,4 +5,11 @@ Boards with the BCM4708 SoC shall have the following properties: Required root node property: +bcm4708 compatible = "brcm,bcm4708"; + +bcm4709 +compatible = "brcm,bcm4709"; + +bcm53012 +compatible = "brcm,bcm53012"; -- 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 2/2] ARM: dts: bcm5301x: Add BCM SVK DT files
Hi Jon, No need for the board in the compatible string. On 15-10-16 02:41 PM, Hauke Mehrtens wrote: On 10/16/2015 12:24 AM, Jon Mason wrote: Add device tree files for Broadcom Northstar based SVKs. Since the bcm5301x.dtsi already exists, all that is necessary is the dts files to enable the UARTs. With these files, the SVKs are able to boot to shell. Signed-off-by: Jon Mason Acked-by: Hauke Mehrtens --- arch/arm/boot/dts/Makefile | 5 +++- arch/arm/boot/dts/bcm94708.dts | 56 +++ arch/arm/boot/dts/bcm94709.dts | 56 +++ arch/arm/boot/dts/bcm953012k.dts | 63 4 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/bcm94708.dts create mode 100644 arch/arm/boot/dts/bcm94709.dts create mode 100644 arch/arm/boot/dts/bcm953012k.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 233159d..96a1b58 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -72,7 +72,10 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm47081-buffalo-wzr-900dhp.dtb \ bcm4709-asus-rt-ac87u.dtb \ bcm4709-buffalo-wxr-1900dhp.dtb \ - bcm4709-netgear-r8000.dtb + bcm4709-netgear-r8000.dtb \ + bcm94708.dtb \ + bcm94709.dtb \ + bcm953012k.dtb dtb-$(CONFIG_ARCH_BCM_63XX) += \ bcm963138dvt.dtb dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \ diff --git a/arch/arm/boot/dts/bcm94708.dts b/arch/arm/boot/dts/bcm94708.dts new file mode 100644 index 000..49682d6 --- /dev/null +++ b/arch/arm/boot/dts/bcm94708.dts @@ -0,0 +1,56 @@ +/* + * BSD LICENSE + * + * Copyright(c) 2015 Broadcom Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + ** Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + ** Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + ** Neither the name of Broadcom Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/dts-v1/; + +#include "bcm4708.dtsi" + +/ { + model = "NorthStar SVK (BCM94708)"; + compatible = "brcm,bcm94708", "brcm,bcm4708"; no need for brcm,bcm94708 + + aliases { + serial0 = &uart0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + memory { + reg = <0x 0x0800>; + }; +}; + +&uart0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm94709.dts b/arch/arm/boot/dts/bcm94709.dts new file mode 100644 index 000..4ab19c0 --- /dev/null +++ b/arch/arm/boot/dts/bcm94709.dts @@ -0,0 +1,56 @@ +/* + * BSD LICENSE + * + * Copyright(c) 2015 Broadcom Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + ** Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + ** Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + ** Neither the name of Broadcom Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE
Re: [PATCH v3 08/10] clk: ns2: add clock support for Broadcom Northstar 2 SoC
On 15-10-15 02:15 PM, Ray Jui wrote: On 10/15/2015 2:10 PM, Jon Mason wrote: On Thu, Oct 15, 2015 at 02:04:09PM -0700, Scott Branden wrote: Hi Ray, Comment at near end. On 15-10-15 01:55 PM, Ray Jui wrote: On 10/15/2015 1:40 PM, Scott Branden wrote: We need some sort of kconfig option to differentiate NS2 clock driver >from being pulled in all the time. On 15-10-15 12:48 PM, Jon Mason wrote: The Broadcom Northstar 2 SoC is architected under the iProc architecture. It has the following PLLs: GENPLL SCR, GENPLL SW, LCPLL DDR, LCPLL Ports, all derived from an onboard crystal. Signed-off-by: Jon Mason --- drivers/clk/Makefile| 2 +- drivers/clk/bcm/Makefile| 1 + drivers/clk/bcm/clk-ns2.c | 288 include/dt-bindings/clock/bcm-ns2.h | 72 + 4 files changed, 362 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/bcm/clk-ns2.c create mode 100644 include/dt-bindings/clock/bcm-ns2.h diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index d08b3e5..6124bd3 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -47,7 +47,7 @@ obj-$(CONFIG_COMMON_CLK_WM831X)+= clk-wm831x.o obj-$(CONFIG_COMMON_CLK_XGENE)+= clk-xgene.o obj-$(CONFIG_COMMON_CLK_PWM)+= clk-pwm.o obj-$(CONFIG_COMMON_CLK_AT91)+= at91/ -obj-$(CONFIG_ARCH_BCM)+= bcm/ +obj-y+= bcm/ obj-$(CONFIG_ARCH_BERLIN)+= berlin/ obj-$(CONFIG_ARCH_HISI)+= hisilicon/ obj-$(CONFIG_ARCH_MXC)+= imx/ diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile index e258b28..2d1cbc5 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -3,6 +3,7 @@ obj-$(CONFIG_CLK_BCM_KONA)+= clk-kona-setup.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-bcm281xx.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-bcm21664.o obj-$(CONFIG_COMMON_CLK_IPROC)+= clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o +obj-$(CONFIG_COMMON_CLK_IPROC)+= clk-ns2.o NS2 code is dragged in for all IPROC SoCs. We need a config option for NS2 (CONFIG_ARCH_BCM_NS2) to avoid this (if Arnd allows this for ARMv8 processors... ?). You can see below ARMv7 processors don't have this problem. The arm64 maintainers (Catalin, Mark, and etc.) stated they only want one ARCH options per chip family. If not we need to add CONFIG_CLK_NS2. If using CONFIG_CLK_NS2, how is it going to be enabled/selected? Since CONFIG_ARCH_BCM_NS2 isn't "allowed" to be introduced we will need to create and select a CONFIG_CLK_BCM_NS2 in the defconfig instead. Is this better than the binary becoming slightly bigger? I thought the extra complexity was worse than having an unused chunk of clk code (and Kona is already doing the same thing above). I believe Ray was in agreement with me during the internal review of this code. Thanks, Jon Yes, I'm okay with leaving it as it is. I even prefer changing the current Makefile to make all iProc based core clock drivers and SoC specific clock tables under CONFIG_COMMON_CLK_IPROC, which is what some of the other vendors do. I'd leave it exactly as is then rather than pulling in more dead code when not needed. This ns2 clock code is very minor compared to other code bloat in the kernel and drivers. Ray Regards, Scott -- 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 08/10] clk: ns2: add clock support for Broadcom Northstar 2 SoC
Hi Ray, Comment at near end. On 15-10-15 01:55 PM, Ray Jui wrote: On 10/15/2015 1:40 PM, Scott Branden wrote: We need some sort of kconfig option to differentiate NS2 clock driver from being pulled in all the time. On 15-10-15 12:48 PM, Jon Mason wrote: The Broadcom Northstar 2 SoC is architected under the iProc architecture. It has the following PLLs: GENPLL SCR, GENPLL SW, LCPLL DDR, LCPLL Ports, all derived from an onboard crystal. Signed-off-by: Jon Mason --- drivers/clk/Makefile| 2 +- drivers/clk/bcm/Makefile| 1 + drivers/clk/bcm/clk-ns2.c | 288 include/dt-bindings/clock/bcm-ns2.h | 72 + 4 files changed, 362 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/bcm/clk-ns2.c create mode 100644 include/dt-bindings/clock/bcm-ns2.h diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index d08b3e5..6124bd3 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -47,7 +47,7 @@ obj-$(CONFIG_COMMON_CLK_WM831X)+= clk-wm831x.o obj-$(CONFIG_COMMON_CLK_XGENE)+= clk-xgene.o obj-$(CONFIG_COMMON_CLK_PWM)+= clk-pwm.o obj-$(CONFIG_COMMON_CLK_AT91)+= at91/ -obj-$(CONFIG_ARCH_BCM)+= bcm/ +obj-y+= bcm/ obj-$(CONFIG_ARCH_BERLIN)+= berlin/ obj-$(CONFIG_ARCH_HISI)+= hisilicon/ obj-$(CONFIG_ARCH_MXC)+= imx/ diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile index e258b28..2d1cbc5 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -3,6 +3,7 @@ obj-$(CONFIG_CLK_BCM_KONA)+= clk-kona-setup.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-bcm281xx.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-bcm21664.o obj-$(CONFIG_COMMON_CLK_IPROC)+= clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o +obj-$(CONFIG_COMMON_CLK_IPROC)+= clk-ns2.o NS2 code is dragged in for all IPROC SoCs. We need a config option for NS2 (CONFIG_ARCH_BCM_NS2) to avoid this (if Arnd allows this for ARMv8 processors... ?). You can see below ARMv7 processors don't have this problem. The arm64 maintainers (Catalin, Mark, and etc.) stated they only want one ARCH options per chip family. If not we need to add CONFIG_CLK_NS2. If using CONFIG_CLK_NS2, how is it going to be enabled/selected? Since CONFIG_ARCH_BCM_NS2 isn't "allowed" to be introduced we will need to create and select a CONFIG_CLK_BCM_NS2 in the defconfig instead. Ray Regards, Scott -- 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 1/2] dt-bindings: Add new boards to bcm4708 DT bindings
On 15-10-15 01:52 PM, Hauke Mehrtens wrote: On 10/15/2015 12:14 AM, Jon Mason wrote: Add the 4708, 4709, and 953012k SVKs to the the documentation for the Broadcom Northstar device tree bindings. Signed-off-by: Jon Mason --- Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt index 6b0f49f..b9cc308 100644 --- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt @@ -5,4 +5,11 @@ Boards with the BCM4708 SoC shall have the following properties: Required root node property: +bcm94708 this should be bcm4708 I thought we wanted to add the SoC names here, isn't bcm94708 a board the bcm4708, the SoC ion this board? I do not really care about this file, has anyone found the documentation what should be listed here? Yes - the 9 infront indicates its some type of board. The SoC part numbers should be listed here. The SoCs are all variants of Northstar/Northstar plus family. Some have different io, packaging, speed grades, etc. Hauke compatible = "brcm,bcm4708"; + +bcm94709 This should be bcm4709 +compatible = "brcm,bcm4709"; + +bcm953012 This should be bcm53012 +compatible = "brcm,bcm53012"; -- 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 04/10] clk: nsp: add clock support for Broadcom Northstar Plus SoC
Jon, Review below. On 15-10-15 12:48 PM, Jon Mason wrote: The Broadcom Northstar Plus SoC is architected under the iProc Based on changes in Makefile below - should this be for Northstar and Northstar Plus? architecture. It has the following PLLs: ARMPLL, GENPLL, LCPLL0, all derived from an onboard crystal. Signed-off-by: Jon Mason --- drivers/clk/bcm/Makefile| 2 + drivers/clk/bcm/clk-nsp.c | 135 include/dt-bindings/clock/bcm-nsp.h | 51 ++ 3 files changed, 188 insertions(+) create mode 100644 drivers/clk/bcm/clk-nsp.c create mode 100644 include/dt-bindings/clock/bcm-nsp.h diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile index 8a7a477..e258b28 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -4,3 +4,5 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-bcm21664.o obj-$(CONFIG_COMMON_CLK_IPROC)+= clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o +obj-$(CONFIG_ARCH_BCM_NSP) += clk-nsp.o +obj-$(CONFIG_ARCH_BCM_5301X) += clk-nsp.o -- 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 08/10] clk: ns2: add clock support for Broadcom Northstar 2 SoC
We need some sort of kconfig option to differentiate NS2 clock driver from being pulled in all the time. On 15-10-15 12:48 PM, Jon Mason wrote: The Broadcom Northstar 2 SoC is architected under the iProc architecture. It has the following PLLs: GENPLL SCR, GENPLL SW, LCPLL DDR, LCPLL Ports, all derived from an onboard crystal. Signed-off-by: Jon Mason --- drivers/clk/Makefile| 2 +- drivers/clk/bcm/Makefile| 1 + drivers/clk/bcm/clk-ns2.c | 288 include/dt-bindings/clock/bcm-ns2.h | 72 + 4 files changed, 362 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/bcm/clk-ns2.c create mode 100644 include/dt-bindings/clock/bcm-ns2.h diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index d08b3e5..6124bd3 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -47,7 +47,7 @@ obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o obj-$(CONFIG_COMMON_CLK_XGENE)+= clk-xgene.o obj-$(CONFIG_COMMON_CLK_PWM) += clk-pwm.o obj-$(CONFIG_COMMON_CLK_AT91) += at91/ -obj-$(CONFIG_ARCH_BCM) += bcm/ +obj-y += bcm/ obj-$(CONFIG_ARCH_BERLIN) += berlin/ obj-$(CONFIG_ARCH_HISI) += hisilicon/ obj-$(CONFIG_ARCH_MXC)+= imx/ diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile index e258b28..2d1cbc5 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -3,6 +3,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-bcm281xx.o obj-$(CONFIG_CLK_BCM_KONA)+= clk-bcm21664.o obj-$(CONFIG_COMMON_CLK_IPROC)+= clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o +obj-$(CONFIG_COMMON_CLK_IPROC) += clk-ns2.o NS2 code is dragged in for all IPROC SoCs. We need a config option for NS2 (CONFIG_ARCH_BCM_NS2) to avoid this (if Arnd allows this for ARMv8 processors... ?). You can see below ARMv7 processors don't have this problem. If not we need to add CONFIG_CLK_NS2. -- 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 01/10] ARM: cygnus: fix link failures when CONFIG_COMMON_CLK_IPROC is disabled
Jon, One question below for others to comment on. On 15-10-15 12:48 PM, Jon Mason wrote: From: Arnd Bergmann When CONFIG_CYGNUS is set but CONFIG_COMMON_CLK_IPROC is disabled, the following link failures are caused: drivers/built-in.o: In function `cygnus_armpll_init': :(.init.text+0x1d290): undefined reference to `iproc_armpll_setup' drivers/built-in.o: In function `cygnus_genpll_clk_init': :(.init.text+0x1d2c4): undefined reference to `iproc_pll_clk_setup' drivers/built-in.o: In function `cygnus_lcpll0_clk_init': :(.init.text+0x1d304): undefined reference to `iproc_pll_clk_setup' drivers/built-in.o: In function `cygnus_mipipll_clk_init': :(.init.text+0x1d344): undefined reference to `iproc_pll_clk_setup' drivers/built-in.o: In function `cygnus_asiu_init': :(.init.text+0x1d370): undefined reference to `iproc_asiu_setup' It is fixed it by always selecting COMMON_CLK_IPROC from ARCH_BCM_IPROC, and making COMMON_CLK_IPROC a silent option (thus preventing it from being erroneously disabled by a user). Signed-off-by: Arnd Bergmann Signed-off-by: Jon Mason --- arch/arm/mach-bcm/Kconfig | 2 +- drivers/clk/bcm/Kconfig | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 1319c3c..84bd265 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -14,7 +14,7 @@ config ARCH_BCM_IPROC select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP select ARM_GLOBAL_TIMER - + select COMMON_CLK_IPROC select CLKSRC_MMIO select ARCH_REQUIRE_GPIOLIB select ARM_AMBA diff --git a/drivers/clk/bcm/Kconfig b/drivers/clk/bcm/Kconfig index 88febf5..46ee475 100644 --- a/drivers/clk/bcm/Kconfig +++ b/drivers/clk/bcm/Kconfig @@ -9,10 +9,8 @@ config CLK_BCM_KONA in the BCM281xx and BCM21664 families. config COMMON_CLK_IPROC - bool "Broadcom iProc clock support" - depends on ARCH_BCM_IPROC + bool depends on COMMON_CLK Should these depends on remain? I think COMMON_CLK_IPROC won't work without them. - default ARCH_BCM_IPROC help Enable common clock framework support for Broadcom SoCs based on the iProc architecture -- 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 7/7] clk: ns2: add clock support for Broadcom Northstar 2 SoC
Jon, Can you add this to your patchset and change COMMON_CLK_IPROC to a silent option? On 15-10-14 01:16 PM, Arnd Bergmann wrote: On Wednesday 14 October 2015 12:46:19 Scott Branden wrote: My patch fixes it by always selecting COMMON_CLK_IPROC from ARCH_BCM_CYGNUS. I wasn't sure whether you want COMMON_CLK_IPROC to still be user-selectable, so I left that in place. Normally I'd expect it to be a silent option though, that just gets implicitly enabled whenever a platform that needs it is built into the kernel. COMMON_CLK_IPROC can be a silent option and selected as Arnd has done below. Ok, please do that then. If you want to apply my patch directly, you can remove that last paragraph from the description. Signed-off-by: Arnd Bergmann Acked-by: Scott Branden Thanks for taking a look! 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: [RFC] ARM: BCM: Add SMP support for Broadcom 4708
Looks good. On 15-10-15 11:14 AM, Jon Mason wrote: ARM: BCM: Add SMP support for Broadcom 4708 Add SMP support for Broadcom's 4708 SoCs. Signed-off-by: Jon Mason Acked-by: Scott Branden --- arch/arm/boot/dts/bcm4708.dtsi | 2 ++ arch/arm/boot/dts/bcm94708.dts | 2 +- arch/arm/mach-bcm/Kconfig | 1 + arch/arm/mach-bcm/Makefile | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm4708.dtsi b/arch/arm/boot/dts/bcm4708.dtsi index 31141e8..22a41df 100644 --- a/arch/arm/boot/dts/bcm4708.dtsi +++ b/arch/arm/boot/dts/bcm4708.dtsi @@ -15,6 +15,8 @@ cpus { #address-cells = <1>; #size-cells = <0>; + enable-method = "brcm,bcm-nsp-smp"; + secondary-boot-reg = <0x0400>; cpu@0 { device_type = "cpu"; diff --git a/arch/arm/boot/dts/bcm94708.dts b/arch/arm/boot/dts/bcm94708.dts index f60bb1d..49682d6 100644 --- a/arch/arm/boot/dts/bcm94708.dts +++ b/arch/arm/boot/dts/bcm94708.dts @@ -32,7 +32,7 @@ /dts-v1/; -#include "bcm5301x.dtsi" +#include "bcm4708.dtsi" / { model = "NorthStar SVK (BCM94708)"; diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 2e9dbb5..4fc8fa3 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -54,6 +54,7 @@ config ARCH_BCM_NSP config ARCH_BCM_5301X bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7 select ARCH_BCM_IPROC + select HAVE_SMP help Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores. diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile index 36a4ca30..3ca1cf1 100644 --- a/arch/arm/mach-bcm/Makefile +++ b/arch/arm/mach-bcm/Makefile @@ -43,6 +43,9 @@ obj-$(CONFIG_ARCH_BCM2835)+= board_bcm2835.o # BCM5301X obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o +ifeq ($(CONFIG_ARCH_BCM_5301X),y) +obj-$(CONFIG_SMP) += headsmp.o platsmp.o +endif # BCM63XXx ifeq ($(CONFIG_ARCH_BCM_63XX),y) -- 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 7/7] clk: ns2: add clock support for Broadcom Northstar 2 SoC
On 15-10-13 03:23 PM, Arnd Bergmann wrote: On Tuesday 13 October 2015 18:04:50 Jon Mason wrote: On a related note, I'm seeing problems when CONFIG_CYGNUS is set but CONFIG_COMMON_CLK_IPROC is disabled, as that currently leads to a link failure. I can double check, but it should be on by default when Cygnus is enabled. If you send me the error, I'll be happy to fix it. The problem is not that it's off by default but that it can be disabled, so it breaks some 'make randconfig' builds with this message: drivers/built-in.o: In function `cygnus_armpll_init': :(.init.text+0x1d290): undefined reference to `iproc_armpll_setup' drivers/built-in.o: In function `cygnus_genpll_clk_init': :(.init.text+0x1d2c4): undefined reference to `iproc_pll_clk_setup' drivers/built-in.o: In function `cygnus_lcpll0_clk_init': :(.init.text+0x1d304): undefined reference to `iproc_pll_clk_setup' drivers/built-in.o: In function `cygnus_mipipll_clk_init': :(.init.text+0x1d344): undefined reference to `iproc_pll_clk_setup' drivers/built-in.o: In function `cygnus_asiu_init': :(.init.text+0x1d370): undefined reference to `iproc_asiu_setup' My patch fixes it by always selecting COMMON_CLK_IPROC from ARCH_BCM_CYGNUS. I wasn't sure whether you want COMMON_CLK_IPROC to still be user-selectable, so I left that in place. Normally I'd expect it to be a silent option though, that just gets implicitly enabled whenever a platform that needs it is built into the kernel. COMMON_CLK_IPROC can be a silent option and selected as Arnd has done below. Signed-off-by: Arnd Bergmann Acked-by: Scott Branden diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 1319c3c14327..35234e563cd8 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -29,6 +29,7 @@ config ARCH_BCM_IPROC config ARCH_BCM_CYGNUS bool "Broadcom Cygnus Support" if ARCH_MULTI_V7 select ARCH_BCM_IPROC + select COMMON_CLK_IPROC help Enable support for the Cygnus family, which includes the following variants: -- 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 2/2] dt-bindings: Add new boards to bcm4708 DT bindings
Hi Jon, Yes, please only add SoC part number compatible strings, not board compatible strings. On 15-10-14 08:34 AM, Jon Mason wrote: On Tue, Oct 13, 2015 at 03:37:49PM -0700, Florian Fainelli wrote: On 13/10/15 14:40, Jon Mason wrote: On Sat, Oct 10, 2015 at 04:42:04PM +0200, Hauke Mehrtens wrote: On 10/03/2015 12:22 AM, Jon Mason wrote: Add the 4708, 4709, and 953012k SVKs to the the documentation for the Broadcom Northstar device tree bindings. Signed-off-by: Jon Mason --- Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt index 6b0f49f..bdf4c06 100644 --- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt What should be documented in this file? This is more a question to the guys more familiar with arm in Linux. Currently the Linux kernel only supports brcm,bcm4708 and all goes back to that one. I was under the impression that all boards should be added to these files. We have been doing so for Cygnus and NSP. Tracking exactly which boards are supported by the brcm,bcm4708 compatible string might be tedious, I tend to agree with just listing the supported SoCs, and leaving the specific board compatibles to the individual DTS files instead. Ok, I'll simply add entries for NS and 4709 to this. Good - we have only been adding SoC compatible strings for Cygnus and NSP - not board compatibles. Thanks, Jon Thanks, Jon @@ -5,4 +5,11 @@ Boards with the BCM4708 SoC shall have the following properties: Required root node property: +bcm94709 compatible = "brcm,bcm4708"; + +bcm94709 +compatible = "brcm,bcm4709", "brcm,bcm4708"; + +bcm953012k +compatible = "brcm,bcm5301k", "brcm,bcm4708"; -- Florian -- 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 2/2] dt-bindings: Add new boards to bcm4708 DT bindings
Hi Jon, One question below. On 15-10-10 07:42 AM, Hauke Mehrtens wrote: On 10/03/2015 12:22 AM, Jon Mason wrote: Add the 4708, 4709, and 953012k SVKs to the the documentation for the Broadcom Northstar device tree bindings. Signed-off-by: Jon Mason --- Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt index 6b0f49f..bdf4c06 100644 --- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt +++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt What should be documented in this file? This is more a question to the guys more familiar with arm in Linux. Currently the Linux kernel only supports brcm,bcm4708 and all goes back to that one. @@ -5,4 +5,11 @@ Boards with the BCM4708 SoC shall have the following properties: Required root node property: +bcm94709 compatible = "brcm,bcm4708"; + +bcm94709 +compatible = "brcm,bcm4709", "brcm,bcm4708"; + +bcm953012k +compatible = "brcm,bcm5301k", "brcm,bcm4708"; Why are you adding a "k" on the string here? bcm5301k is not an SoC part number? -- 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 09/10] clk: ns2: add clock support for Broadcom Northstar 2 SoC
Hi Jon, Comment below. On 15-10-12 11:19 AM, Jon Mason wrote: On Fri, Oct 09, 2015 at 05:33:52PM -0700, Stephen Boyd wrote: On 10/02, Jon Mason wrote: diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 23800a1..2790f21 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -2,6 +2,7 @@ menu "Platform selection" config ARCH_BCM_IPROC bool "Broadcom iProc SoC Family" + select COMMON_CLK_IPROC Given that this is a visible option, I'd expect the defconfig to enable this. After looking at this again, it is completely unnecessary. Removed. help This enables support for Broadcom iProc based SoCs diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index d08b3e5..ea81eaa 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -47,7 +47,8 @@ obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o obj-$(CONFIG_COMMON_CLK_XGENE)+= clk-xgene.o obj-$(CONFIG_COMMON_CLK_PWM) += clk-pwm.o obj-$(CONFIG_COMMON_CLK_AT91) += at91/ -obj-$(CONFIG_ARCH_BCM) += bcm/ +obj-$(CONFIG_CLK_BCM_KONA) += bcm/ +obj-$(CONFIG_COMMON_CLK_IPROC) += bcm/ Also, perhaps we need some sort of Kconfig thing for overall bcm clock drivers, so that we don't have duplicate Makefile rules. config COMMON_CLK_BCM bool "Support for Broadcom clocks" Will do. Is that really necessary at all I think something like this work instead? -obj-$(CONFIG_ARCH_BCM) += bcm/ +obj-y += bcm/ Thanks, Jon -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- 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 3/5] mtd: brcmnand: Optional DT flag to reset IPROC NAND controller
Hi Brian, On 15-10-06 06:41 AM, Brian Norris wrote: Is there a reason not to do this reset unconditionally? I recall this came up in discussion previously, when the OpenWRT folks were trying to integrate with BCMA, where this reset was one of the few differences between the platform- device-based driver (i.e., this one) and the BCMA based driver. Might it help simplify things a bit if we just did the same thing everywhere? This driver is currently shared by Cygnus and NS2. We had similar suggestion when this patch was reviewed internally in Broadcom. The rationale for adding optional DT flag is as follows: 1. The NAND controller reset is currently required for NS2 only so that it is in sane state before any NAND commands are issued. We are not sure if Cygnus and all future iProc SoCs will require NAND controller reset. I'm not sure this is a very strong reason. It seems fairly reasonable in general to reset a HW block before using it. Efficient Boot time is a very strong reason for needing this actually. We use the NAND controller in the bootROM, boot1/BL1, u-boot/UEFI, and then Kernel stage. By properly initializing the controller once we do not need to reset it 4 different times. 2. The NAND controller reset in probe would certainly increase Linux boot time so for certain iProc SoCs we might choose avoid NAND controller reset to reduce boot time if possible. I recall this reason being mentioned before. I believe this only happens because the brcmnand driver doesn't yet handle configuring the timing registers, so iProc is implicitly relying on the bootloader to configure the NAND timings. Perhaps it's time that we fix that. I'd rather not add extra DT properties unless we actually need to [1]. And having proper timing configuration in the Linux driver will help improve speeds for all users (whose timings may not be configured in the bootloader). This is the very reason we need the optional reset property. We need to have timings configured by the linux driver or not. Yes, in some cases we will be relying on earlier boot stages to configure some of the hardware. I actually had some preliminary work to do some timing configuration according to the new timing information from nand_base.c/nand_timing.c. Unfortunately, I didn't complete this, and I'm no longer working at Broadcom, so I don't exactly have access to the HW docs for all the NAND controller revisions, nor do I have access to as much HW for testing... Brian [1] If we really do need a device tree differentiation, perhaps it would be better to just differentiate the compatible string than to have individual boolean properties. e.g.: compatible = "brcm,iproc-nand-ns2", ...; As described above - the option is not SoC specific. It is system specific. In some systems we may wish to reset the NAND controller in linux. In some we may wish to rely on initialization that has already been done to speed up boot times. Regards, Scott -- 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 0/5] Add Broadcom Northstar Plus Support
Patchset all look good. Acked-by: Scott Branden On 15-08-26 03:35 PM, Jon Mason wrote: Changes in version 2 incorporate Olof's comments regarding: * the removal of all "Reviewed-by" lines not occurring on external mailing lists * reordering of s-o-b lines * modification of the device tree file to use labels when enabling * increated description of the modification to the MAINTAINERS entry Also, modifying the "to" and "cc" recepients so that everyone is receving all of the patches. -- This patch series adds support for the Broadcom Northstar Plus family of SoCs. NSP is a Cortex A9 based SoC under the Broadcom iProc family. Jon Mason (5): dt-bindings: Create Documentation for NSP DT bindings ARM: NSP: add minimal Northstar Plus device tree ARM: NSP: Add basic support for Broadcom Northstar Plus SoC ARM: multi_v7_defconfig: Add NSP to defconfig MAINTAINERS: add entry for the Broadcom Northstar Plus SoCs .../devicetree/bindings/arm/bcm/brcm,nsp.txt | 34 +++ MAINTAINERS| 12 ++- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/bcm-nsp.dtsi | 105 + arch/arm/boot/dts/bcm958625k.dts | 57 +++ arch/arm/configs/multi_v7_defconfig| 1 + arch/arm/mach-bcm/Kconfig | 14 +++ arch/arm/mach-bcm/Makefile | 5 +- arch/arm/mach-bcm/bcm_nsp.c| 25 + 9 files changed, 252 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/bcm/brcm,nsp.txt create mode 100644 arch/arm/boot/dts/bcm-nsp.dtsi create mode 100644 arch/arm/boot/dts/bcm958625k.dts create mode 100644 arch/arm/mach-bcm/bcm_nsp.c -- 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 2/5] ARM: NSP: add minimal Northstar Plus device tree
Hi Olof, Comments inline. On 15-08-25 04:36 PM, Olof Johansson wrote: Hi, I'm not sure what the strategy behind your cc:ing on this patch set is. I only got a couple of them in my inbox, and this one wasn't one of them. :) On Thu, Aug 20, 2015 at 10:46 AM, Jon Mason wrote: Add a very minimalistic set of Northstar Plus Device Tree files which describes the SoC and the BCM958625 implementation. The perpherials described are: ARM Cortex A9 CPU 2 8250 UARTs ARM GIC PL310 L2 Cache ARM A9 Global timer Signed-off-by: Jon Mason Signed-off-by: Kapil Hali Reviewed-by: Ray Jui Reviewed-by: Scott Branden Seeing reviewed-by already attached to a v1 of a patchset has limited value for someone on the outside. Reviewed-by is one of those tags that has a value that's mostly dependent on who it comes from. By not actually seeing the review and the feedback provided (and revisions made), less data is provided to tell if it's a valuable review or not. should we start using Ack'd instead then for things that were reviewed internally? Also, if you're posting the code you should probably have your name below Kapil's, since you're the one signing off the origin of the code. See Documentation/SubmittingPatches.txt for details on what S-o-b actually means. --- /dev/null +++ b/arch/arm/boot/dts/bcm-nsp.dtsi @@ -0,0 +1,105 @@ +/* + * BSD LICENSE + * + * Copyright(c) 2015 Broadcom Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + ** Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + ** Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + ** Neither the name of Broadcom Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ I'm not sure we've seen BSD-only submissions before. I'll let DT maintainers (or Ian) speak up in case this would cause problems. Arnd is the one who require new DT content to be BSD licensed. We're just following his orders: http://lkml.iu.edu/hypermail/linux/kernel/1411.1/01109.html + +#include +#include + +#include "skeleton.dtsi" + +/ { + compatible = "brcm,nsp"; + model = "Broadcom Northstar Plus SoC"; + interrupt-parent = <&gic>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + next-level-cache = <&L2>; + reg = <0x0>; + }; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + periph_clk: periph_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <5>; + }; + }; + + uart0: serial@18000300 { + compatible = "ns16550a"; + reg = <0x18000300 0x100>; + interrupts = ; + clock-frequency = <62499840>; + status = "disabled"; + }; + + uart1: serial@18000400 { + compatible = "ns16550a"; + reg = <0x18000400 0x100>; + interrupts = ; + clock-frequency = <62499840>; + status = "disabled"; + }; + + gic: interrupt-controller@19021000 { + compatible =
Re: [PATCH 2/2] spi: bcm-mspi: Add support for Broadcom MSPI driver.
Hi Jon, comment below for full-duplex operation. On 15-05-13 04:49 PM, Jonathan Richardson wrote: On 15-05-12 12:17 PM, Mark Brown wrote: On Tue, May 12, 2015 at 10:38:13AM -0700, Jonathan Richardson wrote: + /* The rx data will go into RXRAM0/1 + last tx length. */ + if (slot + 1 >= NUM_SLOTS) + mspi->rx_slot = 0; + else + mspi->rx_slot = slot + 1; How is this going to work for full duplex transfers if we had to fill the FIFO more than once? See below, it's not. +static int bcm_mspi_transfer_one(struct spi_master *master, + struct spi_device *spidev, struct spi_transfer *transfer) +{ + int err; + + /* 8 bit transfers only are currently supported. */ + if (transfer->bits_per_word > 8) + return -ENOTSUPP; Tell the core what the device supports and it will check for you. + + err = bcm_mspi_tx_data(master, spidev, transfer); + if (err) + return err; + + err = bcm_mspi_rx_data(master, spidev, transfer); + if (err) + return err; + + return 0; +} I would expect the recieve and transmit operations to be running in parallel, not executed one after another, given the need to keep manually filling and draining the FIFOs. The driver was only written with NOR flash in mind as the slave. Since this is really just half duplex, it works, though it won't with a real full duplex slave. m25p80 never calls transfer_one with both tx and rx buffers. The rx bytes that we don't care about from a tx request are dropped. We don't have any full duplex slaves so it's a hard to test. I could possibly re-write this so that tx/rx is interleaved and that should be good for full duplex or close enough that it won't have to be completely overhauled should we ever connect a full duplex slave to it. Maybe I should do that. This came from a pre-existing driver that had the same limitation. The purpose of this mspi interface is to connect to NOR flash. There are other SPI interfaces on the devices used to connect to other SPI devies. We don't have any need to support full duplex slaves on this port (NOR have any hardware wired this way - pun realized after typing this). -- 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] Cygnus Audio Driver
Hi Mark, On 15-03-30 11:43 PM, Mark Brown wrote: On Mon, Mar 30, 2015 at 08:16:22PM -0700, Scott Branden wrote: The audio PLL is embedded in the audio block and only used by the audio block. The audio PLL registers are also in the middle of the audio register map. When you say it's only used by the audio block do you mean to say that the audio block exposes no clock signals other than the bit and frame clocks? The audio block exposes the MCLK in addition to the bit and frame clock. Regards, Scott -- 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] ASoC: add core audio driver for Broadcom Cygnus SOC.
From: Lori Hikichi The audio block has 4 serial ports. 3 ports are configurable as either I2S or TDM. The 4th port is for SPDIF transmit. This audio block is found on the bcm958305, bcm958300, and bcm911360. Reviewed-by: Jonathan Richardson Signed-off-by: Lori Hikichi Signed-off-by: Scott Branden --- sound/soc/bcm/Kconfig | 11 + sound/soc/bcm/Makefile |5 +- sound/soc/bcm/cygnus-pcm.c | 918 + sound/soc/bcm/cygnus-pcm.h | 45 ++ sound/soc/bcm/cygnus-ssp.c | 1613 sound/soc/bcm/cygnus-ssp.h | 84 +++ 6 files changed, 2675 insertions(+), 1 deletion(-) create mode 100644 sound/soc/bcm/cygnus-pcm.c create mode 100644 sound/soc/bcm/cygnus-pcm.h create mode 100644 sound/soc/bcm/cygnus-ssp.c create mode 100644 sound/soc/bcm/cygnus-ssp.h diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig index 6a834e1..2c5ff37 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -7,3 +7,14 @@ config SND_BCM2835_SOC_I2S Say Y or M if you want to add support for codecs attached to the BCM2835 I2S interface. You will also need to select the audio interfaces to support below. + +config SND_SOC_CYGNUS + tristate "SoC platform audio for Broadcom Cygnus chips" + depends on ARCH_BCM_CYGNUS || COMPILE_TEST + default ARCH_BCM_CYGNUS + help + Say Y if you want to add support for ASoC audio on Broadcom + Cygnus chips (bcm958300, bcm958305, bcm911360) + + If you don't know what to do here, say N. + diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile index bc816b7..5c39790 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -1,5 +1,8 @@ # BCM2835 Platform Support snd-soc-bcm2835-i2s-objs := bcm2835-i2s.o -obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o +# CYGNUS Platform Support +snd-soc-cygnus-objs := cygnus-pcm.o cygnus-ssp.o +obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o +obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o diff --git a/sound/soc/bcm/cygnus-pcm.c b/sound/soc/bcm/cygnus-pcm.c new file mode 100644 index 000..3a4106b --- /dev/null +++ b/sound/soc/bcm/cygnus-pcm.c @@ -0,0 +1,918 @@ +/* + * Copyright (C) 2014-2015 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "cygnus-ssp.h" +#include "cygnus-pcm.h" + +/* Register offset needed for ASoC PCM module */ + +#define INTH_R5F_STATUS_OFFSET 0x040 +#define INTH_R5F_CLEAR_OFFSET 0x048 +#define INTH_R5F_MASK_SET_OFFSET 0x050 +#define INTH_R5F_MASK_CLEAR_OFFSET 0x054 + +#define BF_REARM_FREE_MARK_OFFSET 0x344 +#define BF_REARM_FULL_MARK_OFFSET 0x348 + +/* Ring Buffer Ctrl Regs --- Start */ +/* AUD_FMM_BF_CTRL_SOURCECH_RINGBUF_X_RDADDR_REG_BASE */ +#define SRC_RBUF_0_RDADDR_OFFSET 0x500 +#define SRC_RBUF_1_RDADDR_OFFSET 0x518 +#define SRC_RBUF_2_RDADDR_OFFSET 0x530 +#define SRC_RBUF_3_RDADDR_OFFSET 0x548 +#define SRC_RBUF_4_RDADDR_OFFSET 0x560 +#define SRC_RBUF_5_RDADDR_OFFSET 0x578 +#define SRC_RBUF_6_RDADDR_OFFSET 0x590 + +/* AUD_FMM_BF_CTRL_SOURCECH_RINGBUF_X_WRADDR_REG_BASE */ +#define SRC_RBUF_0_WRADDR_OFFSET 0x504 +#define SRC_RBUF_1_WRADDR_OFFSET 0x51c +#define SRC_RBUF_2_WRADDR_OFFSET 0x534 +#define SRC_RBUF_3_WRADDR_OFFSET 0x54c +#define SRC_RBUF_4_WRADDR_OFFSET 0x564 +#define SRC_RBUF_5_WRADDR_OFFSET 0x57c +#define SRC_RBUF_6_WRADDR_OFFSET 0x594 + +/* AUD_FMM_BF_CTRL_SOURCECH_RINGBUF_X_BASEADDR_REG_BASE */ +#define SRC_RBUF_0_BASEADDR_OFFSET 0x508 +#define SRC_RBUF_1_BASEADDR_OFFSET 0x520 +#define SRC_RBUF_2_BASEADDR_OFFSET 0x538 +#define SRC_RBUF_3_BASEADDR_OFFSET 0x550 +#define SRC_RBUF_4_BASEADDR_OFFSET 0x568 +#define SRC_RBUF_5_BASEADDR_OFFSET 0x580 +#define SRC_RBUF_6_BASEADDR_OFFSET 0x598 + +/* AUD_FMM_BF_CTRL_SOURCECH_RINGBUF_X_ENDADDR_REG_BASE */ +#define SRC_RBUF_0_ENDADDR_OFFSET 0x50c +#define SRC_RBUF_1_ENDADDR_OFFSET 0x524 +#define SRC_RBUF_2_ENDADDR_OFFSET 0x53c +#define SRC_RBUF_3_ENDADDR_OFFSET 0x554 +#define SRC_RBUF_4_ENDADDR_OFFSET 0x56c +#define SRC_RBUF_5_ENDADDR_OFFSET 0x584 +#define SRC_RBUF_6_ENDADDR_OFFSET 0x59c + +/* AUD_FMM_BF_CTRL_SOURCECH_RINGBUF_X_FREE_MARK_REG_BASE */ +#define SRC_RBUF_0_FREE_MARK_OFFSET 0x510 +#define SRC_RBUF_1_FREE_MARK_OFFSET 0x528 +#define SRC_RBUF_2_FREE_MARK_OFFSET 0x540 +#define SRC_RBUF_3_FREE_MARK_OFFSET 0x558 +#defi
[PATCH 0/2] Cygnus Audio Driver
Please provide comments on the initial version of this driver. This patchset contains the devicetree bindings and core audio driver for the Cygnus SoC. There is an open question on how to fit this driver into the clock framework (if at all). The audio PLL is embedded in the audio block and only used by the audio block. The audio PLL registers are also in the middle of the audio register map. In addition, the audio PLL is adjustable to less than 1 Hz. The existing clock driver framework does not provide a mechanism to take advantage of the resolution of the hardware. Can the audio PLL remain within the audio driver and/or any modifications required? Lori Hikichi (2): ASoC: cygnus-audio: adding device tree bindings ASoC: add core audio driver for Broadcom Cygnus SOC. .../bindings/sound/brcm,cygnus-audio.txt | 68 + sound/soc/bcm/Kconfig | 11 + sound/soc/bcm/Makefile |5 +- sound/soc/bcm/cygnus-pcm.c | 918 +++ sound/soc/bcm/cygnus-pcm.h | 45 + sound/soc/bcm/cygnus-ssp.c | 1613 sound/soc/bcm/cygnus-ssp.h | 84 + 7 files changed, 2743 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt create mode 100644 sound/soc/bcm/cygnus-pcm.c create mode 100644 sound/soc/bcm/cygnus-pcm.h create mode 100644 sound/soc/bcm/cygnus-ssp.c create mode 100644 sound/soc/bcm/cygnus-ssp.h -- 2.3.3 -- 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] ASoC: cygnus-audio: adding device tree bindings
From: Lori Hikichi Add device tree binding documentation for the Cygnus SOC audio block Reviewed-by: Jonathan Richardson Reviewed-by: Ray Jui Signed-off-by: Scott Branden Signed-off-by: Lori Hikichi --- .../bindings/sound/brcm,cygnus-audio.txt | 68 ++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt diff --git a/Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt b/Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt new file mode 100644 index 000..5358cc3 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt @@ -0,0 +1,68 @@ +BROADCOM Cygnus Audio I2S/TDM/SPDIF controller + +Required properties: + - compatible : "brcm,cygnus-audio" + - #address-cells: 32bit valued, 1 cell. <1> + - #size-cells: 32bit valued, 1 cell. <1> + - reg : Should contain audio registers location and length + - interrupts: audio DMA interrupt number + +SSP Subnode properties: +- dai-name: The name of the DAI registered with ASOC +- ssp-port-id: The ssp port interface to use + Valid value are 0, 1, 2, or 3 (for spdif) +- mode: Controls if this port should be configured as I2S or TDM mode. + Valid values are: "tdm" or "i2s" +- tdm-bits-per-frame: only if mode is "tdm" then this property must set. + Valid values are (128/256/512) +- port-status: Controls if port is enabled or not + Valid values "enabled" or "disabled" +- channel-group: Control grouping of serial port + Valid values are "2_0", "3_1", or "5_1" + +Example: + cygnus_audio: audio@0x180ae000 { + compatible = "brcm,cygnus-audio"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x180ae000 0x1000>; + + interrupts = ; + + ssp0: ssp_port@0 { + dai-name = "cygnus-ssp0"; + ssp-port-id = <0>; + + mode = "i2s"; /* "i2s" or "tdm" */ + channel-group = "2_0"; /* Use 2_0, 3_1, 5_1 */ + port-status = "enabled"; + }; + + ssp1: ssp_port@1 { + dai-name = "cygnus-ssp1"; + ssp-port-id = <1>; + + mode = "i2s"; /* "i2s" or "tdm" */ + channel-group = "2_0"; /* Use 2_0, 3_1, 5_1 */ + port-status = "disabled"; + }; + + ssp2: ssp_port@2 { + dai-name = "cygnus-ssp2"; + ssp-port-id = <2>; + + mode = "tdm"; /* "i2s" or "tdm" */ + tdm-bits-per-frame = <256>; + channel-group = "2_0"; /* Use 2_0, 3_1, 5_1 */ + port-status = "disabled"; + }; + + spdif: spdif_port@3 { + dai-name = "cygnus-spdif"; + ssp-port-id = <3>; + + mode = "i2s"; /* "i2s" or "tdm" */ + channel-group = "2_0"; /* Use 2_0, 3_1, 5_1 */ + port-status = "disabled"; + }; + }; -- 2.3.3 -- 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 v4] dt-bindings: brcm: rationalize Broadcom documentation naming
Hi Rob, On 15-03-22 06:20 PM, Rob Herring wrote: On 03/20/2015 08:06 PM, Scott Branden wrote: This patchset attempts to standardize the naming of dt-bindings documents based on the Broadcom vendor prefix of brcm. Although there are no guidelines currently present for how to name the dt-bindings document the "vendor,binding.txt" style is in use by some of the other vendors. Acked-by: Lee Jones Acked-by: Florian Fainelli Acked-by: Gregory Fong Acked-by: Stephen Warren Signed-off-by: Scott Branden Version history would be nice... Yes, I should have added a cover letter but didn't. The difference between versions was minimal: a spelling correction in the commit message text and a few additional binding files were found that were added between the versions, along with the Ack's. Who did you want to apply this? I can, but I'm worried about merge conflicts here. Hopefully, you're not also doing lots of changes to existing bindings. Yes, it would be great for you to take care of applying this. There shouldn't be any merge conflicts as none of these bindings are currently being updated. I left a clock binding document out of this patchset at Ray Jui is updating/renaming the documentation for that binding in a different patch already. Thanks, Scott Rob --- .../arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt}| 0 .../devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} | 0 .../devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} | 0 .../devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} | 0 .../devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt}| 0 Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} | 0 Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} | 0 .../devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} | 0 .../devicetree/bindings/dma/{bcm2835-dma.txt => brcm,bcm2835-dma.txt} | 0 .../devicetree/bindings/gpio/{gpio-bcm-kona.txt => brcm,kona-gpio.txt}| 0 .../devicetree/bindings/i2c/{i2c-bcm-kona.txt => brcm,kona-i2c.txt} | 0 Documentation/devicetree/bindings/mfd/{bcm590xx.txt => brcm,bcm59056.txt} | 0 .../bindings/mips/brcm/{bcm3384-intc.txt => brcm,bcm3384-intc.txt}| 0 Documentation/devicetree/bindings/mips/brcm/{bmips.txt => brcm,bmips.txt} | 0 .../devicetree/bindings/mips/brcm/{cm-dsl.txt => brcm,cm-dsl.txt} | 0 Documentation/devicetree/bindings/misc/{smc.txt => brcm,kona-smc.txt} | 0 .../devicetree/bindings/mmc/{kona-sdhci.txt => brcm,kona-sdhci.txt} | 0 .../bindings/net/{broadcom-sf2.txt => brcm,bcm7445-switch-v4.0.txt} | 0 .../devicetree/bindings/net/{broadcom-bcmgenet.txt => brcm,bcmgenet.txt} | 0 .../bindings/net/{broadcom-systemport.txt => brcm,systemport.txt} | 0 .../bindings/net/{broadcom-mdio-unimac.txt => brcm,unimac-mdio.txt} | 0 .../devicetree/bindings/phy/{bcm-phy.txt => brcm,kona-usb2-phy.txt} | 0 .../devicetree/bindings/pwm/{bcm-kona-pwm.txt => brcm,kona-pwm.txt} | 0 .../{arm/bcm/kona-resetmgr.txt => reset/brcm,bcm21664-resetmgr.txt} | 0 .../bindings/serial/{bcm63xx-uart.txt => brcm,bcm6345-uart.txt} | 0 .../devicetree/bindings/sound/{bcm2835-i2s.txt => brcm,bcm2835-i2s.txt} | 0 .../bindings/{arm/bcm/kona-timer.txt => timer/brcm,kona-timer.txt}| 0 .../devicetree/bindings/{mips/brcm/usb.txt => usb/brcm,bcm3384-usb.txt} | 0 .../bindings/{arm/bcm/kona-wdt.txt => watchdog/brcm,kona-wdt.txt} | 0 31 files changed, 0 insertions(+), 0 deletions(-) rename Documentation/devicetree/bindings/arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} (100%) rename Documentation/devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} (100%) rename Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} (100%) rename Documentation/devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} (100%) rename Documentation/devicetree/
[PATCH v4] dt-bindings: brcm: rationalize Broadcom documentation naming
This patchset attempts to standardize the naming of dt-bindings documents based on the Broadcom vendor prefix of brcm. Although there are no guidelines currently present for how to name the dt-bindings document the "vendor,binding.txt" style is in use by some of the other vendors. Acked-by: Lee Jones Acked-by: Florian Fainelli Acked-by: Gregory Fong Acked-by: Stephen Warren Signed-off-by: Scott Branden --- .../arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt}| 0 .../devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} | 0 .../devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} | 0 .../devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} | 0 .../devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt}| 0 Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} | 0 Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} | 0 .../devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} | 0 .../devicetree/bindings/dma/{bcm2835-dma.txt => brcm,bcm2835-dma.txt} | 0 .../devicetree/bindings/gpio/{gpio-bcm-kona.txt => brcm,kona-gpio.txt}| 0 .../devicetree/bindings/i2c/{i2c-bcm-kona.txt => brcm,kona-i2c.txt} | 0 Documentation/devicetree/bindings/mfd/{bcm590xx.txt => brcm,bcm59056.txt} | 0 .../bindings/mips/brcm/{bcm3384-intc.txt => brcm,bcm3384-intc.txt}| 0 Documentation/devicetree/bindings/mips/brcm/{bmips.txt => brcm,bmips.txt} | 0 .../devicetree/bindings/mips/brcm/{cm-dsl.txt => brcm,cm-dsl.txt} | 0 Documentation/devicetree/bindings/misc/{smc.txt => brcm,kona-smc.txt} | 0 .../devicetree/bindings/mmc/{kona-sdhci.txt => brcm,kona-sdhci.txt} | 0 .../bindings/net/{broadcom-sf2.txt => brcm,bcm7445-switch-v4.0.txt} | 0 .../devicetree/bindings/net/{broadcom-bcmgenet.txt => brcm,bcmgenet.txt} | 0 .../bindings/net/{broadcom-systemport.txt => brcm,systemport.txt} | 0 .../bindings/net/{broadcom-mdio-unimac.txt => brcm,unimac-mdio.txt} | 0 .../devicetree/bindings/phy/{bcm-phy.txt => brcm,kona-usb2-phy.txt} | 0 .../devicetree/bindings/pwm/{bcm-kona-pwm.txt => brcm,kona-pwm.txt} | 0 .../{arm/bcm/kona-resetmgr.txt => reset/brcm,bcm21664-resetmgr.txt} | 0 .../bindings/serial/{bcm63xx-uart.txt => brcm,bcm6345-uart.txt} | 0 .../devicetree/bindings/sound/{bcm2835-i2s.txt => brcm,bcm2835-i2s.txt} | 0 .../bindings/{arm/bcm/kona-timer.txt => timer/brcm,kona-timer.txt}| 0 .../devicetree/bindings/{mips/brcm/usb.txt => usb/brcm,bcm3384-usb.txt} | 0 .../bindings/{arm/bcm/kona-wdt.txt => watchdog/brcm,kona-wdt.txt} | 0 31 files changed, 0 insertions(+), 0 deletions(-) rename Documentation/devicetree/bindings/arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} (100%) rename Documentation/devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} (100%) rename Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} (100%) rename Documentation/devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} (100%) rename Documentation/devicetree/bindings/dma/{bcm2835-dma.txt => brcm,bcm2835-dma.txt} (100%) rename Documentation/devicetree/bindings/gpio/{gpio-bcm-kona.txt => brcm,kona-gpio.txt} (100%) rename Documentation/devicetree/bindings/i2c/{i2c-bcm-kona.txt => brcm,kona-i2c.txt} (100%) rename Documentation/devicetree/bindings/mfd/{bcm590xx.txt => brcm,bcm59056.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{bcm3384-intc.txt => brcm,bcm3384-intc.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{bmips.txt => brcm,bmips.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{cm-dsl.txt => brcm,cm-dsl.txt} (100%) rename Documentation/devicetree/bindings/misc/{smc.txt => brcm,kona-smc.txt} (100%) rename Documentation/devicetree/bindings/mmc/{kona-sdhci.txt => brcm,kona-sdhci.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-sf2.txt => brcm,bcm7445-switch-v4.0.txt} (100%) rename Documen
Re: [PATCH v6 0/6] Add common clock support for Broadcom iProc architecture
Patchset looks good now. Scott On 15-03-17 10:45 PM, Ray Jui wrote: This patchset contains the initial common clock support for Broadcom's iProc family of SoCs. The iProc clock architecture comprises of various PLLs, e.g., ARMPLL, GENPLL, LCPLL0, MIPIPLL, and etc. An onboard crystal serves as the basic reference clock for these PLLs. Each PLL may have several leaf clocks. One special group of clocks is the ASIU clocks, which are dervied directly from the crystal reference clock. This patchset also contains the basic clock support for the Broadcom Cygnus SoC, which implements the iProc clock architecture Changes from v5: - Rebase to v4.0-rc4 - Drop of_clk_get_parent_rate helper function from the clock framework - Get rid of custom "clock-frequency" support in iProc PLL code. Instead, add standard clock set_rate and round_rate support and make use of DT properties "assigned-clocks" and "assigned-clock-rates" to initialize PLL to the desired rate when registering to the clock framework - Add SW workaround for ASIC bug on MIPI PLL to always read back the same register following a write transaction, to ensure value is written to the correct register Changes from v4: - Add of_clk_get_parent_rate helper function into the clock framework - Switch to use of_clk_get_parent_rate in the iProc PLL clock driver Changes from v3: - Fix incorrect use of passing in of_clk_src_onecell_get when adding ARM PLL and other iProc PLLs as clock provider. These PLLs have zero cells in DT and thefore of_clk_src_simple_get should be used instead - Rename Cygnus MIPI PLL Channel 2 clock from BCM_CYGNUS_MIPIPLL_CH2_UNUSED to BCM_CYGNUS_MIPIPLL_CH2_V3D, since a 3D graphic rendering engine has been integrated into Cygnus revision B0 and has its core clock running off MIPI PLL Channel 2 - Changed default MIPI PLL VCO frequency from 1.75 GHz to 2.1 GHz. This allows us to derive 300 MHz V3D clock from channel 2 through the post divisor Changes from v2: - Re-arrange Cygnus clock/pll init functions so each init function is right next to its clock table - Removed #defines for number of clocks in Cygnus. Have the number of clocks automatically determined based on array size of the clock table Changes from v1: - Separate drivers/clk/Makefile change for drivers/clk/bcm out to a standalone patch Ray Jui (6): clk: iproc: define Broadcom iProc clock binding clk: iproc: add initial common clock support clk: Change bcm clocks build dependency clk: cygnus: add clock support for Broadcom Cygnus ARM: dts: enable clock support for Broadcom Cygnus clk: cygnus: remove Cygnus dummy clock binding .../devicetree/bindings/clock/bcm-cygnus-clock.txt | 34 -- .../bindings/clock/brcm,iproc-clocks.txt | 171 +++ arch/arm/boot/dts/bcm-cygnus-clock.dtsi| 112 - arch/arm/boot/dts/bcm-cygnus.dtsi |2 +- drivers/clk/Makefile |2 +- drivers/clk/bcm/Kconfig|9 + drivers/clk/bcm/Makefile |2 + drivers/clk/bcm/clk-cygnus.c | 284 drivers/clk/bcm/clk-iproc-armpll.c | 282 +++ drivers/clk/bcm/clk-iproc-asiu.c | 275 +++ drivers/clk/bcm/clk-iproc-clk.c| 244 ++ drivers/clk/bcm/clk-iproc-pll.c| 490 drivers/clk/bcm/clk-iproc.h| 164 +++ include/dt-bindings/clock/bcm-cygnus.h | 65 +++ 14 files changed, 2075 insertions(+), 61 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt create mode 100644 Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt create mode 100644 drivers/clk/bcm/clk-cygnus.c create mode 100644 drivers/clk/bcm/clk-iproc-armpll.c create mode 100644 drivers/clk/bcm/clk-iproc-asiu.c create mode 100644 drivers/clk/bcm/clk-iproc-clk.c create mode 100644 drivers/clk/bcm/clk-iproc-pll.c create mode 100644 drivers/clk/bcm/clk-iproc.h create mode 100644 include/dt-bindings/clock/bcm-cygnus.h -- 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] dt-bindings: brcm: rationalize Broadcom documentation naming
This patchset attempts to standarize the naming of dt-bindings documents based on the Broadcom vendor prefix of brcm. Although there are no guidelines currently present for how to name the dt-bindings document the "vendor,binding.txt" style is in use by some of the other vendors. Acked-by: Stephen Warren Signed-off-by: Scott Branden --- .../arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt}| 0 .../devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} | 0 .../devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} | 0 .../devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} | 0 .../devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt}| 0 Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} | 0 Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} | 0 .../devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} | 0 .../devicetree/bindings/dma/{bcm2835-dma.txt => brcm,bcm2835-dma.txt} | 0 .../devicetree/bindings/gpio/{gpio-bcm-kona.txt => brcm,kona-gpio.txt}| 0 .../devicetree/bindings/i2c/{i2c-bcm-kona.txt => brcm,kona-i2c.txt} | 0 Documentation/devicetree/bindings/mfd/{bcm590xx.txt => brcm,bcm59056.txt} | 0 .../bindings/mips/brcm/{bcm3384-intc.txt => brcm,bcm3384-intc.txt}| 0 Documentation/devicetree/bindings/mips/brcm/{bmips.txt => brcm,bmips.txt} | 0 .../devicetree/bindings/mips/brcm/{cm-dsl.txt => brcm,cm-dsl.txt} | 0 Documentation/devicetree/bindings/misc/{smc.txt => brcm,kona-smc.txt} | 0 .../devicetree/bindings/mmc/{kona-sdhci.txt => brcm,kona-sdhci.txt} | 0 .../bindings/net/{broadcom-sf2.txt => brcm,bcm7445-switch-v4.0.txt} | 0 .../devicetree/bindings/net/{broadcom-bcmgenet.txt => brcm,bcmgenet.txt} | 0 .../bindings/net/{broadcom-systemport.txt => brcm,systemport.txt} | 0 .../bindings/net/{broadcom-mdio-unimac.txt => brcm,unimac-mdio.txt} | 0 .../devicetree/bindings/phy/{bcm-phy.txt => brcm,kona-usb2-phy.txt} | 0 .../devicetree/bindings/pwm/{bcm-kona-pwm.txt => brcm,kona-pwm.txt} | 0 .../{arm/bcm/kona-resetmgr.txt => reset/brcm,bcm21664-resetmgr.txt} | 0 .../bindings/serial/{bcm63xx-uart.txt => brcm,bcm6345-uart.txt} | 0 .../devicetree/bindings/sound/{bcm2835-i2s.txt => brcm,bcm2835-i2s.txt} | 0 .../bindings/{arm/bcm/kona-timer.txt => timer/brcm,kona-timer.txt}| 0 .../devicetree/bindings/{mips/brcm/usb.txt => usb/brcm,bcm3384-usb.txt} | 0 .../bindings/{arm/bcm/kona-wdt.txt => watchdog/brcm,kona-wdt.txt} | 0 31 files changed, 0 insertions(+), 0 deletions(-) rename Documentation/devicetree/bindings/arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} (100%) rename Documentation/devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} (100%) rename Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} (100%) rename Documentation/devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} (100%) rename Documentation/devicetree/bindings/dma/{bcm2835-dma.txt => brcm,bcm2835-dma.txt} (100%) rename Documentation/devicetree/bindings/gpio/{gpio-bcm-kona.txt => brcm,kona-gpio.txt} (100%) rename Documentation/devicetree/bindings/i2c/{i2c-bcm-kona.txt => brcm,kona-i2c.txt} (100%) rename Documentation/devicetree/bindings/mfd/{bcm590xx.txt => brcm,bcm59056.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{bcm3384-intc.txt => brcm,bcm3384-intc.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{bmips.txt => brcm,bmips.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{cm-dsl.txt => brcm,cm-dsl.txt} (100%) rename Documentation/devicetree/bindings/misc/{smc.txt => brcm,kona-smc.txt} (100%) rename Documentation/devicetree/bindings/mmc/{kona-sdhci.txt => brcm,kona-sdhci.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-sf2.txt => brcm,bcm7445-switch-v4.0.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-bcmgenet.txt => brcm,bcm
Re: [PATCH] dt-bindings: brcm: rationalize Broadcom documentation naming
On 15-03-18 03:03 PM, Stephen Warren wrote: On 03/18/2015 03:53 PM, Scott Branden wrote: Hi Stephen, On 15-03-18 12:42 PM, Stephen Warren wrote: On 03/18/2015 01:24 PM, Scott Branden wrote: This patchset attempts to standarize the naming of dt-bindings documents based on the Broadcom vendor prefix of brcm. Although there are no guidelines currently present for how to name the dt-bindings document the "vendor,binding.txt" style is in use by some of the other vendors. Conceptually I'm fine with this. Acked-by: Stephen Warren The only comment I have is that some bindings refer to other bindings, e.g. an I2C controller binding might refer to the core I2C binding to define core I2C properties. Since this patch moves a couple files between directories, did you double-check that none of the pathnames in those references need fixing up? Yes, I read all the brcm documents and did not find references to the moved files. Oh, I meant references *from* the moved files to other files. Yes, some of the moved/renamed files reference other files. But those are to references to common dt-binding documentation files and of the form Documentation/devicetree/bindings/xxx/yyy.txt BTW, I just noticed that both your patches don't have signed-off-by lines. Whoops - thanks - will have to correct. Plus, add your Acked-by. -- 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] dt-bindings: brcm: rationalize Broadcom documentation naming
This patchset attempts to standarize the naming of dt-bindings documents based on the Broadcom vendor prefix of brcm. Although there are no guidelines currently present for how to name the dt-bindings document the "vendor,binding.txt" style is in use by some of the other vendors. --- .../arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt}| 0 .../devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} | 0 .../devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} | 0 .../devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} | 0 .../devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt}| 0 Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} | 0 Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} | 0 .../devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} | 0 .../devicetree/bindings/dma/{bcm2835-dma.txt => brcm,bcm2835-dma.txt} | 0 .../devicetree/bindings/gpio/{gpio-bcm-kona.txt => brcm,kona-gpio.txt}| 0 .../devicetree/bindings/i2c/{i2c-bcm-kona.txt => brcm,kona-i2c.txt} | 0 Documentation/devicetree/bindings/mfd/{bcm590xx.txt => brcm,bcm59056.txt} | 0 .../bindings/mips/brcm/{bcm3384-intc.txt => brcm,bcm3384-intc.txt}| 0 Documentation/devicetree/bindings/mips/brcm/{bmips.txt => brcm,bmips.txt} | 0 .../devicetree/bindings/mips/brcm/{cm-dsl.txt => brcm,cm-dsl.txt} | 0 Documentation/devicetree/bindings/misc/{smc.txt => brcm,kona-smc.txt} | 0 .../devicetree/bindings/mmc/{kona-sdhci.txt => brcm,kona-sdhci.txt} | 0 .../bindings/net/{broadcom-sf2.txt => brcm,bcm7445-switch-v4.0.txt} | 0 .../devicetree/bindings/net/{broadcom-bcmgenet.txt => brcm,bcmgenet.txt} | 0 .../bindings/net/{broadcom-systemport.txt => brcm,systemport.txt} | 0 .../bindings/net/{broadcom-mdio-unimac.txt => brcm,unimac-mdio.txt} | 0 .../devicetree/bindings/phy/{bcm-phy.txt => brcm,kona-usb2-phy.txt} | 0 .../devicetree/bindings/pwm/{bcm-kona-pwm.txt => brcm,kona-pwm.txt} | 0 .../{arm/bcm/kona-resetmgr.txt => reset/brcm,bcm21664-resetmgr.txt} | 0 .../bindings/serial/{bcm63xx-uart.txt => brcm,bcm6345-uart.txt} | 0 .../devicetree/bindings/sound/{bcm2835-i2s.txt => brcm,bcm2835-i2s.txt} | 0 .../bindings/{arm/bcm/kona-timer.txt => timer/brcm,kona-timer.txt}| 0 .../devicetree/bindings/{mips/brcm/usb.txt => usb/brcm,bcm3384-usb.txt} | 0 .../bindings/{arm/bcm/kona-wdt.txt => watchdog/brcm,kona-wdt.txt} | 0 31 files changed, 0 insertions(+), 0 deletions(-) rename Documentation/devicetree/bindings/arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} (100%) rename Documentation/devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} (100%) rename Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} (100%) rename Documentation/devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} (100%) rename Documentation/devicetree/bindings/dma/{bcm2835-dma.txt => brcm,bcm2835-dma.txt} (100%) rename Documentation/devicetree/bindings/gpio/{gpio-bcm-kona.txt => brcm,kona-gpio.txt} (100%) rename Documentation/devicetree/bindings/i2c/{i2c-bcm-kona.txt => brcm,kona-i2c.txt} (100%) rename Documentation/devicetree/bindings/mfd/{bcm590xx.txt => brcm,bcm59056.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{bcm3384-intc.txt => brcm,bcm3384-intc.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{bmips.txt => brcm,bmips.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{cm-dsl.txt => brcm,cm-dsl.txt} (100%) rename Documentation/devicetree/bindings/misc/{smc.txt => brcm,kona-smc.txt} (100%) rename Documentation/devicetree/bindings/mmc/{kona-sdhci.txt => brcm,kona-sdhci.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-sf2.txt => brcm,bcm7445-switch-v4.0.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-bcmgenet.txt => brcm,bcmgenet.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-systemport.txt => brcm,systemport.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-mdio-unimac.txt => brcm,unimac-mdio.txt} (100%) rena
Re: [PATCH] dt-bindings: brcm: rationalize Broadcom documentation naming
Hi Stephen, On 15-03-18 12:42 PM, Stephen Warren wrote: On 03/18/2015 01:24 PM, Scott Branden wrote: This patchset attempts to standarize the naming of dt-bindings documents based on the Broadcom vendor prefix of brcm. Although there are no guidelines currently present for how to name the dt-bindings document the "vendor,binding.txt" style is in use by some of the other vendors. Conceptually I'm fine with this. Acked-by: Stephen Warren The only comment I have is that some bindings refer to other bindings, e.g. an I2C controller binding might refer to the core I2C binding to define core I2C properties. Since this patch moves a couple files between directories, did you double-check that none of the pathnames in those references need fixing up? Yes, I read all the brcm documents and did not find references to the moved files. In my search I found 4 more files inconsistently named from the Kona family. I'm submitting a new patch with those files renamed as well. Thanks, Scott -- 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] dt-bindings: brcm: rationalize Broadcom documentation naming
This patchset attempts to standarize the naming of dt-bindings documents based on the Broadcom vendor prefix of brcm. Although there are no guidelines currently present for how to name the dt-bindings document the "vendor,binding.txt" style is in use by some of the other vendors. --- .../arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt}| 0 .../devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} | 0 .../devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} | 0 .../devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} | 0 .../devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} | 0 .../devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt}| 0 Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} | 0 Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} | 0 .../devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} | 0 .../devicetree/bindings/dma/{bcm2835-dma.txt => brcm,bcm2835-dma.txt} | 0 Documentation/devicetree/bindings/mfd/{bcm590xx.txt => brcm,bcm59056.txt} | 0 .../bindings/mips/brcm/{bcm3384-intc.txt => brcm,bcm3384-intc.txt}| 0 Documentation/devicetree/bindings/mips/brcm/{bmips.txt => brcm,bmips.txt} | 0 .../devicetree/bindings/mips/brcm/{cm-dsl.txt => brcm,cm-dsl.txt} | 0 .../bindings/net/{broadcom-sf2.txt => brcm,bcm7445-switch-v4.0.txt} | 0 .../devicetree/bindings/net/{broadcom-bcmgenet.txt => brcm,bcmgenet.txt} | 0 .../bindings/net/{broadcom-systemport.txt => brcm,systemport.txt} | 0 .../bindings/net/{broadcom-mdio-unimac.txt => brcm,unimac-mdio.txt} | 0 .../devicetree/bindings/phy/{bcm-phy.txt => brcm,kona-usb2-phy.txt} | 0 .../devicetree/bindings/pwm/{bcm-kona-pwm.txt => brcm,kona-pwm.txt} | 0 .../{arm/bcm/kona-resetmgr.txt => reset/brcm,bcm21664-resetmgr.txt} | 0 .../bindings/serial/{bcm63xx-uart.txt => brcm,bcm6345-uart.txt} | 0 .../devicetree/bindings/sound/{bcm2835-i2s.txt => brcm,bcm2835-i2s.txt} | 0 .../bindings/{arm/bcm/kona-timer.txt => timer/brcm,kona-timer.txt}| 0 .../devicetree/bindings/{mips/brcm/usb.txt => usb/brcm,bcm3384-usb.txt} | 0 .../bindings/{arm/bcm/kona-wdt.txt => watchdog/brcm,kona-wdt.txt} | 0 27 files changed, 0 insertions(+), 0 deletions(-) rename Documentation/devicetree/bindings/arm/bcm/{brcm,bcm11351-cpu-method => brcm,bcm11351-cpu-method.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm11351.txt => brcm,bcm11351.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm21664.txt => brcm,bcm21664.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm2835.txt => bcm/brcm,bcm2835.txt} (100%) rename Documentation/devicetree/bindings/arm/{bcm4708.txt => bcm/brcm,bcm4708.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{bcm63138.txt => brcm,bcm63138.txt} (100%) rename Documentation/devicetree/bindings/arm/{brcm-brcmstb.txt => bcm/brcm,brcmstb.txt} (100%) rename Documentation/devicetree/bindings/arm/bcm/{cygnus.txt => brcm,cygnus.txt} (100%) rename Documentation/devicetree/bindings/bus/{bcma.txt => brcm,bus-axi.txt} (100%) rename Documentation/devicetree/bindings/clock/{bcm-kona-clock.txt => brcm,kona-ccu.txt} (100%) rename Documentation/devicetree/bindings/dma/{bcm2835-dma.txt => brcm,bcm2835-dma.txt} (100%) rename Documentation/devicetree/bindings/mfd/{bcm590xx.txt => brcm,bcm59056.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{bcm3384-intc.txt => brcm,bcm3384-intc.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{bmips.txt => brcm,bmips.txt} (100%) rename Documentation/devicetree/bindings/mips/brcm/{cm-dsl.txt => brcm,cm-dsl.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-sf2.txt => brcm,bcm7445-switch-v4.0.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-bcmgenet.txt => brcm,bcmgenet.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-systemport.txt => brcm,systemport.txt} (100%) rename Documentation/devicetree/bindings/net/{broadcom-mdio-unimac.txt => brcm,unimac-mdio.txt} (100%) rename Documentation/devicetree/bindings/phy/{bcm-phy.txt => brcm,kona-usb2-phy.txt} (100%) rename Documentation/devicetree/bindings/pwm/{bcm-kona-pwm.txt => brcm,kona-pwm.txt} (100%) rename Documentation/devicetree/bindings/{arm/bcm/kona-resetmgr.txt => reset/brcm,bcm21664-resetmgr.txt} (100%) rename Documentation/devicetree/bindings/serial/{bcm63xx-uart.txt => brcm,bcm6345-uart.txt} (100%) rename Documentation/devicetree/bindings/sound/{bcm2835-i2s.txt => brcm,bcm2835-i2s.txt} (100%) rename Documentation/devicetree/bindings/{arm/bcm/kona-timer.txt => timer/brcm,kona-timer.txt} (100%) rename Documentation/devicetree/bindings/{mips/brcm/usb.txt => usb/brcm,bcm3384-usb.t
Re: [PATCH 2/4 v3] dt/bindings: Add binding for BCM2835 mailbox driver
Hi Lubomir, On 15-03-17 10:27 AM, Lee Jones wrote: On Thu, 12 Mar 2015, Eric Anholt wrote: From: Lubomir Rintel Signed-off-by: Lubomir Rintel Signed-off-by: Craig McGeachie Signed-off-by: Eric Anholt --- v2: Split into a separate patch for submitting to the devicetree list. Consistently start node docs with a capital letter. device's address in the example shouldn't have "0x". Drop machine-specific interrupt numbers from the docs. (changes by anholt). v3: Move the file to just bcm2835-mbox.txt, clean up formatting (changes by anholt, from review by Lee Jones). Thanks for fixing up. .../devicetree/bindings/mailbox/bcm2835-mbox.txt | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/bcm2835-mbox.txt I don't see any unruliness or causes of controversy. Acked-by: Lee Jones diff --git a/Documentation/devicetree/bindings/mailbox/bcm2835-mbox.txt b/Documentation/devicetree/bindings/mailbox/bcm2835-mbox.txt new file mode 100644 index 000..0bb2b9d --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/bcm2835-mbox.txt I am trying to standarize all broadcom device tree bindings in the format "brcm,binding.txt". Could you please rename this file to brcm,bcm2835-mbox.txt for consistency in bindings? Regards, Scott -- 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 2/3] Documentation: devicetree: add binding doc for Broadcom NAND controller
Hi Brian, On 15-03-16 04:46 PM, Brian Norris wrote: On Mon, Mar 16, 2015 at 04:40:13PM -0700, Scott Branden wrote: On 15-03-16 04:37 PM, Brian Norris wrote: On Mon, Mar 16, 2015 at 04:07:51PM -0700, Scott Branden wrote: So, what's the standard? Company prefix? Long name? Commas? Hyphens? The problem with devicetree binding is there is no standard for much of anything. Some others use the vendor prefix for all their binding documentation. We can try to do the same? Ok, but we already have 3 versions for Broadcom. I can use 'brcm,' if that helps... Yes, it helps if we try standardizing on the brcm vendor prefix in Documentation/devicetree/bindings/vendor-prefixes.txt. If you sift through the bindings directory you will find some of the other vendors have done the same. Also, of note. In Documentation/devicetree/bindings/submitting-patches.txt it states the Documentation should be the first patch in the series. Perhaps this helps the devicetree maintainer in reviewing bindings? Scott Brian -- 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 2/3] Documentation: devicetree: add binding doc for Broadcom NAND controller
On 15-03-16 04:37 PM, Brian Norris wrote: On Mon, Mar 16, 2015 at 04:07:51PM -0700, Scott Branden wrote: On 15-03-06 05:18 PM, Brian Norris wrote: Signed-off-by: Brian Norris --- .../devicetree/bindings/mtd/brcmstb_nand.txt | 109 + 1 file changed, 109 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/brcmstb_nand.txt diff --git a/Documentation/devicetree/bindings/mtd/brcmstb_nand.txt b/Documentation/devicetree/bindings/mtd/brcmstb_nand.txt new file mode 100644 index ..933d44943cbb --- /dev/null Could you change the binding document with the vendor prefix to match all the other drivers we have been submitting? ie. "brcm,brcmnand.txt" $ find Documentation/devicetree/ -name 'broadcom*' Documentation/devicetree/bindings/net/broadcom-systemport.txt Documentation/devicetree/bindings/net/broadcom-bcm87xx.txt Documentation/devicetree/bindings/net/broadcom-mdio-unimac.txt Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt Documentation/devicetree/bindings/net/broadcom-sf2.txt $ find Documentation/devicetree/ -name 'brcm[^,]*' Documentation/devicetree/bindings/arm/brcm-brcmstb.txt $ find Documentation/devicetree/ -name 'brcm,*' Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt Documentation/devicetree/bindings/i2c/brcm,iproc-i2c.txt Documentation/devicetree/bindings/i2c/brcm,bcm2835-i2c.txt Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt Documentation/devicetree/bindings/rng/brcm,bcm2835.txt Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt $ find Documentation/devicetree/bindings -name '*.txt' | grep -v ','| wc -l 1227 $ find Documentation/devicetree/bindings -name '*.txt' | grep ','| wc -l 352 So, what's the standard? Company prefix? Long name? Commas? Hyphens? The problem with devicetree binding is there is no standard for much of anything. Some others use the vendor prefix for all their binding documentation. We can try to do the same? Brian -- 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 2/3] Documentation: devicetree: add binding doc for Broadcom NAND controller
Hi Brian, On 15-03-06 05:18 PM, Brian Norris wrote: Signed-off-by: Brian Norris --- .../devicetree/bindings/mtd/brcmstb_nand.txt | 109 + 1 file changed, 109 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/brcmstb_nand.txt diff --git a/Documentation/devicetree/bindings/mtd/brcmstb_nand.txt b/Documentation/devicetree/bindings/mtd/brcmstb_nand.txt new file mode 100644 index ..933d44943cbb --- /dev/null Could you change the binding document with the vendor prefix to match all the other drivers we have been submitting? ie. "brcm,brcmnand.txt" Regards, Scott -- 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/4] mmc: sdhci: do not set AUTO_CMD12 for multi-block CMD53
From: Corneliu Doban For CMD53 in block mode, the host does not need to stop the transfer, as it stops when the block count (present in CMD53) is reached. Signed-off-by: Corneliu Doban Signed-off-by: Scott Branden --- drivers/mmc/host/sdhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index fcf78ab..f35d413 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "sdhci.h" @@ -934,7 +935,8 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host, * If we are sending CMD23, CMD12 never gets sent * on successful completion (so no Auto-CMD12). */ - if (!host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD12)) + if (!host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD12) && + (cmd->opcode != SD_IO_RW_EXTENDED)) mode |= SDHCI_TRNS_AUTO_CMD12; else if (host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD23)) { mode |= SDHCI_TRNS_AUTO_CMD23; -- 2.2.2 -- 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/4] mmc: sdhci-iproc: add IPROC SDHCI driver
Add IPROC SDHCI driver for IPROC family of Broadcom devices. Acked-by: Ray Jui Signed-off-by: Corneliu Doban Signed-off-by: Scott Branden --- drivers/mmc/host/Kconfig | 14 +++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-iproc.c | 241 + 3 files changed, 256 insertions(+) create mode 100644 drivers/mmc/host/sdhci-iproc.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 2d6fbdd..d6a2ff1 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -292,6 +292,20 @@ config MMC_SDHCI_BCM2835 If unsure, say N. +config MMC_SDHCI_IPROC + tristate "SDHCI platform support for the iProc SD/MMC Controller" + depends on ARCH_BCM_IPROC || COMPILE_TEST + depends on MMC_SDHCI_PLTFM + default ARCH_BCM_IPROC + select MMC_SDHCI_IO_ACCESSORS + help + This selects the iProc SD/MMC controller. + + If you have an IPROC platform with SD or MMC devices, + say Y or M here. + + If unsure, say N. + config MMC_MOXART tristate "MOXART SD/MMC Host Controller support" depends on ARCH_MOXART && MMC diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index f7b0a77..32f24bd 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -70,6 +70,7 @@ obj-$(CONFIG_MMC_SDHCI_OF_ESDHC) += sdhci-of-esdhc.o obj-$(CONFIG_MMC_SDHCI_OF_HLWD)+= sdhci-of-hlwd.o obj-$(CONFIG_MMC_SDHCI_BCM_KONA) += sdhci-bcm-kona.o obj-$(CONFIG_MMC_SDHCI_BCM2835)+= sdhci-bcm2835.o +obj-$(CONFIG_MMC_SDHCI_IPROC) += sdhci-iproc.o obj-$(CONFIG_MMC_SDHCI_MSM)+= sdhci-msm.o obj-$(CONFIG_MMC_SDHCI_ST) += sdhci-st.o diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c new file mode 100644 index 000..4139d34 --- /dev/null +++ b/drivers/mmc/host/sdhci-iproc.c @@ -0,0 +1,241 @@ +/* + * Copyright (C) 2014 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * iProc SDHCI platform driver + */ + +#include +#include +#include +#include +#include +#include "sdhci-pltfm.h" + +struct sdhci_iproc_data { + const struct sdhci_pltfm_data *pdata; + u32 caps; + u32 caps1; +}; + +struct sdhci_iproc_host { + const struct sdhci_iproc_data *data; + u32 shadow_cmd; + u32 shadow_blk; +}; + +#define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18) + +static inline u32 sdhci_iproc_readl(struct sdhci_host *host, int reg) +{ + u32 val = readl(host->ioaddr + reg); + + pr_debug("%s: readl [0x%02x] 0x%08x\n", +mmc_hostname(host->mmc), reg, val); + return val; +} + +static u16 sdhci_iproc_readw(struct sdhci_host *host, int reg) +{ + u32 val = sdhci_iproc_readl(host, (reg & ~3)); + u16 word = val >> REG_OFFSET_IN_BITS(reg) & 0x; + return word; +} + +static u8 sdhci_iproc_readb(struct sdhci_host *host, int reg) +{ + u32 val = sdhci_iproc_readl(host, (reg & ~3)); + u8 byte = val >> REG_OFFSET_IN_BITS(reg) & 0xff; + return byte; +} + +static inline void sdhci_iproc_writel(struct sdhci_host *host, u32 val, int reg) +{ + pr_debug("%s: writel [0x%02x] 0x%08x\n", +mmc_hostname(host->mmc), reg, val); + + writel(val, host->ioaddr + reg); + + if (host->clock <= 40) { + /* Round up to micro-second four SD clock delay */ + if (host->clock) + udelay((4 * 100 + host->clock - 1) / host->clock); + else + udelay(10); + } +} + +/* + * The Arasan has a bugette whereby it may lose the content of successive + * writes to the same register that are within two SD-card clock cycles of + * each other (a clock domain crossing problem). The data + * register does not have this problem, which is just as well - otherwise we'd + * have to nobble the DMA engine too. + * + * This wouldn't be a problem with the code except that we can only write the + * controller with 32-bit writes. So two different 16-bit registers are + * written back to back creates the problem. + * + * In reality, this only happens when SDHCI_BLOCK_SIZE and SDHCI_BLOCK_COUNT + * are written followed by SDHCI_TRANSFER_MODE and SDHCI_COMMAND. + * The BLOCK_SIZE and BLOCK_COUNT are meaningless until a command issued
[PATCH 4/4] mmc: sdhci-iproc: add device tree bindings
Add device tree binding documentation for IPROC SDHCI driver. Acked-by: Ray Jui Signed-off-by: Corneliu Doban Signed-off-by: Scott Branden --- .../devicetree/bindings/mmc/brcm,sdhci-iproc.txt | 23 ++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt new file mode 100644 index 000..72cc9cc --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt @@ -0,0 +1,23 @@ +Broadcom IPROC SDHCI controller + +This file documents differences between the core properties described +by mmc.txt and the properties that represent the IPROC SDHCI controller. + +Required properties: +- compatible : Should be "brcm,sdhci-iproc-cygnus". +- clocks : The clock feeding the SDHCI controller. + +Optional properties: + - sdhci,auto-cmd12: specifies that controller should use auto CMD12. + +Example: + +sdhci0: sdhci@0x18041000 { + compatible = "brcm,sdhci-iproc-cygnus"; + reg = <0x18041000 0x100>; + interrupts = ; + clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>; + bus-width = <4>; + sdhci,auto-cmd12; + no-1-8-v; +}; -- 2.2.2 -- 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/4] mmc: sdhci: add quirk for ACMD23 broken
Add quirk to handle broken auto-CMD23. Some controllers do not respond after the first auto-CMD23 is issued. This allows CMD23 to still work (mandatory for the faster UHS-I mode) rather than disabling CMD23 entirely via SDHCI_QUIRK2_HOST_NO_CMD23. Signed-off by: Corneliu Doban Signed-off-by: Scott Branden Signed-off-by: Scott Branden --- drivers/mmc/host/sdhci.c | 3 ++- include/linux/mmc/sdhci.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index f1a488e..fcf78ab 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3085,7 +3085,8 @@ int sdhci_add_host(struct sdhci_host *host) /* Auto-CMD23 stuff only works in ADMA or PIO. */ if ((host->version >= SDHCI_SPEC_300) && ((host->flags & SDHCI_USE_ADMA) || -!(host->flags & SDHCI_USE_SDMA))) { +!(host->flags & SDHCI_USE_SDMA)) && +!(host->quirks2 & SDHCI_QUIRK2_ACMD23_BROKEN)) { host->flags |= SDHCI_AUTO_CMD23; DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc)); } else { diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index f767a0d..a29e9bb 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -106,6 +106,8 @@ struct sdhci_host { #define SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD (1<<10) /* Capability register bit-63 indicates HS400 support */ #define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 (1<<11) +/* Controller broken with using ACMD23 */ +#define SDHCI_QUIRK2_ACMD23_BROKEN (1<<12) int irq;/* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ -- 2.2.2 -- 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 RESEND 0/4] Add support for IPROC SDHCI controller
This series of patchsets contains the IPROC SDHCI driver used in a series of Broadcom SoCs Quirks are also added to support this controller. Corneliu Doban (1): mmc: sdhci: do not set AUTO_CMD12 for multi-block CMD53 Scott Branden (3): mmc: sdhci: add quirk for ACMD23 broken mmc: sdhci-iproc: add IPROC SDHCI driver mmc: sdhci-iproc: add device tree bindings .../devicetree/bindings/mmc/brcm,sdhci-iproc.txt | 23 ++ drivers/mmc/host/Kconfig | 14 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-iproc.c | 241 + drivers/mmc/host/sdhci.c | 7 +- include/linux/mmc/sdhci.h | 2 + 6 files changed, 286 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt create mode 100644 drivers/mmc/host/sdhci-iproc.c -- 2.2.2 -- 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 4/4] mmc: sdhci-iproc: add device tree bindings
Hi Florian, On 15-03-02 03:50 PM, Florian Fainelli wrote: Unless there is a re-spin, I will fix this myself while applying this patch to devicetree/next. Thanks Yes, you can patch the formatting if the driver is being integrated. But I have had no response or feedback on the sdhci driver. It has been sitting for 1 month. -- 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 0/2] Add support for Broadcom RNG200
This series of patchsets contains the Broadcom Random Number Generator driver and device tree binding documentation. Changes from v2: added usleep_range instead of cpu_relax add init and cleanup functions following new hwrng model Changes from v1: added \n to 2 dev_err messages Scott Branden (2): hwrng: iproc-rng200 - Add device tree bindings hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver .../bindings/hwrng/brcm,iproc-rng200.txt | 12 + drivers/char/hw_random/Kconfig | 13 ++ drivers/char/hw_random/Makefile| 1 + drivers/char/hw_random/iproc-rng200.c | 254 + 4 files changed, 280 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt create mode 100644 drivers/char/hw_random/iproc-rng200.c -- 2.3.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 2/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
This adds a driver for random number generator present on Broadcom IPROC devices. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/char/hw_random/Kconfig| 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/iproc-rng200.c | 254 ++ 3 files changed, 268 insertions(+) create mode 100644 drivers/char/hw_random/iproc-rng200.c diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index de57b38..f48cf11 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -101,6 +101,19 @@ config HW_RANDOM_BCM2835 If unsure, say Y. +config HW_RANDOM_IPROC_RNG200 + tristate "Broadcom iProc RNG200 support" + depends on ARCH_BCM_IPROC + default HW_RANDOM + ---help--- + This driver provides kernel-side support for the RNG200 + hardware found on the Broadcom iProc SoCs. + + To compile this driver as a module, choose M here: the + module will be called iproc-rng200 + + If unsure, say Y. + config HW_RANDOM_GEODE tristate "AMD Geode HW Random Number Generator support" depends on X86_32 && PCI diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index 0b4cd57..055bb01 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile @@ -28,5 +28,6 @@ obj-$(CONFIG_HW_RANDOM_POWERNV) += powernv-rng.o obj-$(CONFIG_HW_RANDOM_EXYNOS) += exynos-rng.o obj-$(CONFIG_HW_RANDOM_TPM) += tpm-rng.o obj-$(CONFIG_HW_RANDOM_BCM2835) += bcm2835-rng.o +obj-$(CONFIG_HW_RANDOM_IPROC_RNG200) += iproc-rng200.o obj-$(CONFIG_HW_RANDOM_MSM) += msm-rng.o obj-$(CONFIG_HW_RANDOM_XGENE) += xgene-rng.o diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c new file mode 100644 index 000..276cb8a --- /dev/null +++ b/drivers/char/hw_random/iproc-rng200.c @@ -0,0 +1,254 @@ +/* +* Copyright (C) 2015 Broadcom Corporation +* +* 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 version 2. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ +/* + * DESCRIPTION: The Broadcom iProc RNG200 Driver + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Registers */ +#define RNG_CTRL_OFFSET0x00 +#define RNG_CTRL_RNG_RBGEN_MASK0x1FFF +#define RNG_CTRL_RNG_RBGEN_ENABLE 0x0001 +#define RNG_CTRL_RNG_RBGEN_DISABLE 0x + +#define RNG_SOFT_RESET_OFFSET 0x04 +#define RNG_SOFT_RESET 0x0001 + +#define RBG_SOFT_RESET_OFFSET 0x08 +#define RBG_SOFT_RESET 0x0001 + +#define RNG_INT_STATUS_OFFSET 0x18 +#define RNG_INT_STATUS_MASTER_FAIL_LOCKOUT_IRQ_MASK0x8000 +#define RNG_INT_STATUS_STARTUP_TRANSITIONS_MET_IRQ_MASK0x0002 +#define RNG_INT_STATUS_NIST_FAIL_IRQ_MASK 0x0020 +#define RNG_INT_STATUS_TOTAL_BITS_COUNT_IRQ_MASK 0x0001 + +#define RNG_FIFO_DATA_OFFSET 0x20 + +#define RNG_FIFO_COUNT_OFFSET 0x24 +#define RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK 0x00FF + +struct iproc_rng200_dev { + void __iomem*base; +}; + +static void iproc_rng200_restart(void __iomem *rng_base) +{ + uint32_t val; + + /* Disable RBG */ + val = ioread32(rng_base + RNG_CTRL_OFFSET); + val &= ~RNG_CTRL_RNG_RBGEN_MASK; + val |= RNG_CTRL_RNG_RBGEN_DISABLE; + iowrite32(val, rng_base + RNG_CTRL_OFFSET); + + /* Clear all interrupt status */ + iowrite32(0xUL, rng_base + RNG_INT_STATUS_OFFSET); + + /* Reset RNG and RBG */ + val = ioread32(rng_base + RBG_SOFT_RESET_OFFSET); + val |= RBG_SOFT_RESET; + iowrite32(val, rng_base + RBG_SOFT_RESET_OFFSET); + + val = ioread32(rng_base + RNG_SOFT_RESET_OFFSET); + val |= RNG_SOFT_RESET; + iowrite32(val, rng_base + RNG_SOFT_RESET_OFFSET); + + val = ioread32(rng_base + RNG_SOFT_RESET_OFFSET); + val &= ~RNG_SOFT_RESET; + iowrite32(val, rng_base + RNG_SOFT_RESET_OFFSET); + + val = ioread32(rng_base + RBG_SOFT_RESET_OFFSET); + val &= ~RBG_SOFT_RESET; + iowrite32(val, rng_base + RBG_SOFT_RESET_OFFSET); + + /* Enable RBG */ + val = ioread32(rng_base + RNG_CTRL_OFFSET); + val &= ~RNG_CTRL_RN
[PATCH v3 1/2] hwrng: iproc-rng200 - Add device tree bindings
Documents the IPROC random number generator device tree bindings used in some Broadcom chipsets. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- .../devicetree/bindings/hwrng/brcm,iproc-rng200.txt | 12 1 file changed, 12 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt diff --git a/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt b/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt new file mode 100644 index 000..e25a456 --- /dev/null +++ b/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt @@ -0,0 +1,12 @@ +HWRNG support for the iproc-rng200 driver + +Required properties: +- compatible : "brcm,iproc-rng200" +- reg : base address and size of control register block + +Example: + +rng { +compatible = "brcm,iproc-rng200"; +reg = <0x18032000 0x28>; +}; -- 2.3.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 v2 2/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
Hi Dmitry, Looking at the driver based on your comments it is following models of older hwrng drivers. I will work on cleaning up based on your comments as well. On 15-02-25 10:43 AM, Dmitry Torokhov wrote: Hi Scott, On Wed, Feb 25, 2015 at 10:16:24AM -0800, Scott Branden wrote: This adds a driver for random number generator present on Broadcom IPROC devices. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/char/hw_random/Kconfig| 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/iproc-rng200.c | 239 ++ 3 files changed, 253 insertions(+) create mode 100644 drivers/char/hw_random/iproc-rng200.c diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index de57b38..f48cf11 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -101,6 +101,19 @@ config HW_RANDOM_BCM2835 If unsure, say Y. +config HW_RANDOM_IPROC_RNG200 + tristate "Broadcom iProc RNG200 support" + depends on ARCH_BCM_IPROC + default HW_RANDOM + ---help--- + This driver provides kernel-side support for the RNG200 + hardware found on the Broadcom iProc SoCs. + + To compile this driver as a module, choose M here: the + module will be called iproc-rng200 + + If unsure, say Y. + config HW_RANDOM_GEODE tristate "AMD Geode HW Random Number Generator support" depends on X86_32 && PCI diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index 0b4cd57..055bb01 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile @@ -28,5 +28,6 @@ obj-$(CONFIG_HW_RANDOM_POWERNV) += powernv-rng.o obj-$(CONFIG_HW_RANDOM_EXYNOS)+= exynos-rng.o obj-$(CONFIG_HW_RANDOM_TPM) += tpm-rng.o obj-$(CONFIG_HW_RANDOM_BCM2835) += bcm2835-rng.o +obj-$(CONFIG_HW_RANDOM_IPROC_RNG200) += iproc-rng200.o obj-$(CONFIG_HW_RANDOM_MSM) += msm-rng.o obj-$(CONFIG_HW_RANDOM_XGENE) += xgene-rng.o diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c new file mode 100644 index 000..4643aa9 --- /dev/null +++ b/drivers/char/hw_random/iproc-rng200.c @@ -0,0 +1,239 @@ +/* +* Copyright (C) 2014 Broadcom Corporation +* +* 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 version 2. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ +/* + * DESCRIPTION: The Broadcom iProc RNG200 Driver + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Registers */ +#define RNG_CTRL_OFFSET0x00 +#define RNG_CTRL_RNG_RBGEN_MASK0x1FFF +#define RNG_CTRL_RNG_RBGEN_ENABLE 0x0001 +#define RNG_CTRL_RNG_RBGEN_DISABLE 0x + +#define RNG_SOFT_RESET_OFFSET 0x04 +#define RNG_SOFT_RESET_RNG_SOFT_RESET_MASK 0x0001 +#define RNG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE 0x0001 +#define RNG_SOFT_RESET_RNG_SOFT_RESET_CLEAR0x + +#define RBG_SOFT_RESET_OFFSET 0x08 +#define RBG_SOFT_RESET_RNG_SOFT_RESET_MASK 0x0001 +#define RBG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE 0x0001 +#define RBG_SOFT_RESET_RNG_SOFT_RESET_CLEAR0x + +#define RNG_INT_STATUS_OFFSET 0x18 +#define RNG_INT_STATUS_MASTER_FAIL_LOCKOUT_IRQ_MASK0x8000 +#define RNG_INT_STATUS_STARTUP_TRANSITIONS_MET_IRQ_MASK0x0002 +#define RNG_INT_STATUS_NIST_FAIL_IRQ_MASK 0x0020 +#define RNG_INT_STATUS_TOTAL_BITS_COUNT_IRQ_MASK 0x0001 + +#define RNG_FIFO_DATA_OFFSET 0x20 + +#define RNG_FIFO_COUNT_OFFSET 0x24 +#define RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK 0x00FF + +static void iproc_rng200_restart(void __iomem *rng_base) +{ + uint32_t val; + + /* Disable RBG */ + val = ioread32(rng_base + RNG_CTRL_OFFSET); + val &= ~RNG_CTRL_RNG_RBGEN_MASK; + val |= RNG_CTRL_RNG_RBGEN_DISABLE; + iowrite32(val, rng_base + RNG_CTRL_OFFSET); + + /* Clear all interrupt status */ + iowrite32(0xUL, rng_base + RNG_INT_STATUS_OFFSET); + + /* Reset RNG and RBG */ + val = ioread32(rng_base + RBG_SOFT_RESET_OFFSET); + val &= ~RBG_SOFT_RESET_RNG_SOFT_RESET_MASK; + val |= RBG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE; + iowrite32(val, rng_base + RBG_SOFT_RE
Re: [PATCH v4 2/2] Input: bcm-keypad: Add Broadcom keypad controller
Hi Dmitry, I understand what's missing now. Thanks, Scott On 15-03-02 12:23 PM, Dmitry Torokhov wrote: Hi Scott, Hmm, also bcm_kp_start() and bcm_kp_stop() should check if kp->clk is valid before trying to enable/disable it. I checked and other keyboard drivers do not check this. I return an error in bcm_kp_start if the clk enable fails. On stop, if the clk is not valid something is really, really wrong as well. The other drivers simply abort probe() if they can't get clock, you decided to allow probe() to finish and assume that clock is already enabled, leaving kp->clk == ERR_PTR(-ENOENT) in your version. If you try then calling clk_prepare_enable() with that pointer it is going to bomb, that is why I said you need to check pointer validity in bcm_kp_start() and bcm_kp_stop(). Thanks. -- 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/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
Hi Arnd, Thanks for the suggested change. On 15-02-28 11:31 AM, Arnd Bergmann wrote: On Saturday 28 February 2015 08:01:11 Scott Branden wrote: The udelay(10) that the other drivers have seems about appropriate then, and we can independently think of a way to refine the interface. Please add a comment that explains the rate. Also, is there some kind of FIFO present in the hwrng device? If it can store close to 1ms work of data (1000 bits), you can just use an msleep(1) to wait for the pool to recover. FIFO is 512 bits. I will look as to whether we can live with 1/2 throughput. In that case, I think usleep_range(min(len * 8, 500), 500)) would be a good compromise: it waits at most until the fifo is full, but might return earlier if enough bits are available to fulfill the request. OK, will change in next version. 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: [PATCH v4 2/2] Input: bcm-keypad: Add Broadcom keypad controller
Hi Dmitry, Yes, please improve the driver and make the local change. Regards, Scott On 15-02-28 02:15 PM, Dmitry Torokhov wrote: On Sat, Feb 28, 2015 at 02:10:22PM -0800, Dmitry Torokhov wrote: Hi Scott, On Sat, Feb 28, 2015 at 08:35:57AM -0800, Scott Branden wrote: + /* Enable clock */ + + kp->clk = devm_clk_get(&pdev->dev, "peri_clk"); + if (IS_ERR(kp->clk)) { + dev_info(&pdev->dev, + "No clock specified. Assuming it's enabled\n"); I was doing the final pass before applying and I think that this is not quite correct, as it does not handle -EPROBE_DEFER properly which is quite common. I think we should do something like this: error = PTR_ERR(kp->clk); if (error != -ENOENT) { if (error != -EPROBE_DEFER) dev_err(.. "Failed to get clock" ...); return error; } dev_dbg(... "No clock specified" ...); No need to resubmit if you are OK with this, I can make the change locally. Hmm, also bcm_kp_start() and bcm_kp_stop() should check if kp->clk is valid before trying to enable/disable it. I am ok with these changes if you want to change locally. + } + else { Checkpach should have warned you that it should have been "} else {"; I'll fix it up locally along with few other cosmetic changes and dropping a few extra headers. Thanks. -- Dmitry -- 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 v4 2/2] Input: bcm-keypad: Add Broadcom keypad controller
Hi Dmitry, I don't see the need for a check of the clock in bcm_kp_start or stop. See comment below. On 15-02-28 02:15 PM, Dmitry Torokhov wrote: On Sat, Feb 28, 2015 at 02:10:22PM -0800, Dmitry Torokhov wrote: Hi Scott, On Sat, Feb 28, 2015 at 08:35:57AM -0800, Scott Branden wrote: + /* Enable clock */ + + kp->clk = devm_clk_get(&pdev->dev, "peri_clk"); + if (IS_ERR(kp->clk)) { + dev_info(&pdev->dev, + "No clock specified. Assuming it's enabled\n"); I was doing the final pass before applying and I think that this is not quite correct, as it does not handle -EPROBE_DEFER properly which is quite common. I think we should do something like this: error = PTR_ERR(kp->clk); if (error != -ENOENT) { if (error != -EPROBE_DEFER) dev_err(.. "Failed to get clock" ...); return error; } dev_dbg(... "No clock specified" ...); No need to resubmit if you are OK with this, I can make the change locally. Hmm, also bcm_kp_start() and bcm_kp_stop() should check if kp->clk is valid before trying to enable/disable it. I checked and other keyboard drivers do not check this. I return an error in bcm_kp_start if the clk enable fails. On stop, if the clk is not valid something is really, really wrong as well. + } + else { Checkpach should have warned you that it should have been "} else {"; I'll fix it up locally along with few other cosmetic changes and dropping a few extra headers. Thanks. -- Dmitry -- 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 v4 1/2] Input: bcm-keypad: add device tree bindings
Documents the Broadcom keypad controller device tree bindings. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- .../devicetree/bindings/input/brcm,bcm-keypad.txt | 108 + 1 file changed, 108 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt diff --git a/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt new file mode 100644 index 000..b77f50b --- /dev/null +++ b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt @@ -0,0 +1,108 @@ +* Broadcom Keypad Controller device tree bindings + +Broadcom Keypad controller is used to interface a SoC with a matrix-type +keypad device. The keypad controller supports multiple row and column lines. +A key can be placed at each intersection of a unique row and a unique column. +The keypad controller can sense a key-press and key-release and report the +event using a interrupt to the cpu. + +This binding is based on the matrix-keymap binding with the following +changes: + +keypad,num-rows and keypad,num-columns are required. + +Required SoC Specific Properties: +- compatible: should be "brcm,bcm-keypad" + +- reg: physical base address of the controller and length of memory mapped + region. + +- interrupts: The interrupt number to the cpu. + +Board Specific Properties: +- keypad,num-rows: Number of row lines connected to the keypad + controller. + +- keypad,num-columns: Number of column lines connected to the + keypad controller. + +- col-debounce-filter-period: The debounce period for the Column filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- status-debounce-filter-period: The debounce period for the Status filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- row-output-enabled: An optional property indicating whether the row or + column is being used as output. If specified the row is being used + as the output. Else defaults to column. + +- pull-up-enabled: An optional property indicating the Keypad scan mode. + If specified implies the keypad scan pull-up has been enabled. + +- autorepeat: Boolean, Enable auto repeat feature of Linux input + subsystem (optional). + +- linux,keymap: The keymap for keys as described in the binding document + devicetree/bindings/input/matrix-keymap.txt. + +Example: +#include "dt-bindings/input/input.h" + +/ { + keypad: keypad@180ac000 { + /* Required SoC specific properties */ + compatible = "brcm,bcm-keypad"; + + /* Required Board specific properties */ + keypad,num-rows = <5>; + keypad,num-columns = <5>; + status = "okay"; + + linux,keymap = ; + + /* Optional board specific properties */ + col-debounce-filter-period = <5>; + row-output-enabled; + pull-up-enabled; + + }; +}; -- 2.3.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 v4 2/2] Input: bcm-keypad: Add Broadcom keypad controller
Add driver for Broadcom's keypad controller. Broadcom Keypad controller is used to interface a SoC with a matrix-type keypad device. The keypad controller supports multiple row and column lines. A key can be placed at each intersection of a unique row and a unique column. The keypad controller can sense a key-press and key-release and report the event using a interrupt to the cpu. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/bcm-keypad.c | 463 3 files changed, 474 insertions(+) create mode 100644 drivers/input/keyboard/bcm-keypad.c diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index a5d9b3f..3a0c0f2 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -676,4 +676,14 @@ config KEYBOARD_CAP11XX To compile this driver as a module, choose M here: the module will be called cap11xx. +config KEYBOARD_BCM + tristate "Broadcom keypad driver" + select INPUT_MATRIXKMAP + default ARCH_BCM_CYGNUS + help + Say Y here if you want to use Broadcom keypad. + + To compile this driver as a module, choose M here: the + module will be called bcm-keypad. + endif diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index febafa5..3cff8f6 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_ADP5589)+= adp5589-keys.o obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o +obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o obj-$(CONFIG_KEYBOARD_BFIN)+= bf54x-keys.o obj-$(CONFIG_KEYBOARD_CAP11XX) += cap11xx.o obj-$(CONFIG_KEYBOARD_CLPS711X)+= clps711x-keypad.o diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c new file mode 100644 index 000..0fde149 --- /dev/null +++ b/drivers/input/keyboard/bcm-keypad.c @@ -0,0 +1,463 @@ +/* + * Copyright (C) 2014 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_CLK_HZ 31250 +/* Repeat period (ms) */ +#define KEY_REPEAT_PERIOD 100 +/* First time press dly (ms) */ +#define KEY_REPEAT_DELAY400 +#define MAX_ROWS8 +#define MAX_COLS8 + +/* Register/field definitions */ +#define KPCR_OFFSET 0x0080 +#define KPCR_MODE 0x0002 +#define KPCR_MODE_SHIFT 1 +#define KPCR_MODE_MASK 1 +#define KPCR_ENABLE 0x0001 +#define KPCR_STATUSFILTERENABLE 0x8000 +#define KPCR_STATUSFILTERTYPE_SHIFT 12 +#define KPCR_COLFILTERENABLE0x0800 +#define KPCR_COLFILTERTYPE_SHIFT 8 +#define KPCR_ROWWIDTH_SHIFT 20 +#define KPCR_COLUMNWIDTH_SHIFT 16 + +#define KPIOR_OFFSET 0x0084 +#define KPIOR_ROWOCONTRL_SHIFT 24 +#define KPIOR_ROWOCONTRL_MASK0xFF00 +#define KPIOR_COLUMNOCONTRL_SHIFT16 +#define KPIOR_COLUMNOCONTRL_MASK 0x00FF +#define KPIOR_COLUMN_IO_DATA_SHIFT 0 + +#define KPEMR0_OFFSET0x0090 +#define KPEMR1_OFFSET0x0094 +#define KPEMR2_OFFSET0x0098 +#define KPEMR3_OFFSET0x009C +#define KPEMR_EDGETYPE_BOTH 3 + +#define KPSSR0_OFFSET0x00A0 +#define KPSSR1_OFFSET0x00A4 +#define KPSSRN_OFFSET(reg_n) (KPSSR0_OFFSET + (4 * reg_n)) +#define KPIMR0_OFFSET0x00B0 +#define KPIMR1_OFFSET0x00B4 +#define KPICR0_OFFSET0x00B8 +#define KPICR1_OFFSET0x00BC +#define KPICRN_OFFSET(reg_n) (KPICR0_OFFSET + (4 * reg_n)) +#define KPISR0_OFFSET0x00C0 +#define KPISR1_OFFSET
[PATCH v4 0/2] Add support for Broadcom keypad controller
This series of patchsets contains the Broadcom keypad controller driver and device tree binding documentation. Changes from v3: - corrected GPL to GPL v2 Changes from v2: - changed binding to use autorepeat - stylistic updates Changes from v1: - updated dt documentation to remove to matrix-keymap.txt - removed bcm_kp_remove as it is not necessary - removed key-interrupt-trigger-type dt binding - added bcm_kp_report_keys and call to process key registers Scott Branden (2): Input: bcm-keypad: add device tree bindings Input: bcm-keypad: Add Broadcom keypad controller .../devicetree/bindings/input/brcm,bcm-keypad.txt | 108 + drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile| 1 + drivers/input/keyboard/bcm-keypad.c| 463 + 4 files changed, 582 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt create mode 100644 drivers/input/keyboard/bcm-keypad.c -- 2.3.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 1/2] Input: bcm-keypad: add device tree bindings
Documents the Broadcom keypad controller device tree bindings. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- .../devicetree/bindings/input/brcm,bcm-keypad.txt | 108 + 1 file changed, 108 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt diff --git a/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt new file mode 100644 index 000..b77f50b --- /dev/null +++ b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt @@ -0,0 +1,108 @@ +* Broadcom Keypad Controller device tree bindings + +Broadcom Keypad controller is used to interface a SoC with a matrix-type +keypad device. The keypad controller supports multiple row and column lines. +A key can be placed at each intersection of a unique row and a unique column. +The keypad controller can sense a key-press and key-release and report the +event using a interrupt to the cpu. + +This binding is based on the matrix-keymap binding with the following +changes: + +keypad,num-rows and keypad,num-columns are required. + +Required SoC Specific Properties: +- compatible: should be "brcm,bcm-keypad" + +- reg: physical base address of the controller and length of memory mapped + region. + +- interrupts: The interrupt number to the cpu. + +Board Specific Properties: +- keypad,num-rows: Number of row lines connected to the keypad + controller. + +- keypad,num-columns: Number of column lines connected to the + keypad controller. + +- col-debounce-filter-period: The debounce period for the Column filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- status-debounce-filter-period: The debounce period for the Status filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- row-output-enabled: An optional property indicating whether the row or + column is being used as output. If specified the row is being used + as the output. Else defaults to column. + +- pull-up-enabled: An optional property indicating the Keypad scan mode. + If specified implies the keypad scan pull-up has been enabled. + +- autorepeat: Boolean, Enable auto repeat feature of Linux input + subsystem (optional). + +- linux,keymap: The keymap for keys as described in the binding document + devicetree/bindings/input/matrix-keymap.txt. + +Example: +#include "dt-bindings/input/input.h" + +/ { + keypad: keypad@180ac000 { + /* Required SoC specific properties */ + compatible = "brcm,bcm-keypad"; + + /* Required Board specific properties */ + keypad,num-rows = <5>; + keypad,num-columns = <5>; + status = "okay"; + + linux,keymap = ; + + /* Optional board specific properties */ + col-debounce-filter-period = <5>; + row-output-enabled; + pull-up-enabled; + + }; +}; -- 2.3.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 2/2] Input: bcm-keypad: Add Broadcom keypad controller
Add driver for Broadcom's keypad controller. Broadcom Keypad controller is used to interface a SoC with a matrix-type keypad device. The keypad controller supports multiple row and column lines. A key can be placed at each intersection of a unique row and a unique column. The keypad controller can sense a key-press and key-release and report the event using a interrupt to the cpu. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/bcm-keypad.c | 463 3 files changed, 474 insertions(+) create mode 100644 drivers/input/keyboard/bcm-keypad.c diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index a5d9b3f..3a0c0f2 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -676,4 +676,14 @@ config KEYBOARD_CAP11XX To compile this driver as a module, choose M here: the module will be called cap11xx. +config KEYBOARD_BCM + tristate "Broadcom keypad driver" + select INPUT_MATRIXKMAP + default ARCH_BCM_CYGNUS + help + Say Y here if you want to use Broadcom keypad. + + To compile this driver as a module, choose M here: the + module will be called bcm-keypad. + endif diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index febafa5..3cff8f6 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_ADP5589)+= adp5589-keys.o obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o +obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o obj-$(CONFIG_KEYBOARD_BFIN)+= bf54x-keys.o obj-$(CONFIG_KEYBOARD_CAP11XX) += cap11xx.o obj-$(CONFIG_KEYBOARD_CLPS711X)+= clps711x-keypad.o diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c new file mode 100644 index 000..8ef8add --- /dev/null +++ b/drivers/input/keyboard/bcm-keypad.c @@ -0,0 +1,463 @@ +/* + * Copyright (C) 2014 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_CLK_HZ 31250 +/* Repeat period (ms) */ +#define KEY_REPEAT_PERIOD 100 +/* First time press dly (ms) */ +#define KEY_REPEAT_DELAY400 +#define MAX_ROWS8 +#define MAX_COLS8 + +/* Register/field definitions */ +#define KPCR_OFFSET 0x0080 +#define KPCR_MODE 0x0002 +#define KPCR_MODE_SHIFT 1 +#define KPCR_MODE_MASK 1 +#define KPCR_ENABLE 0x0001 +#define KPCR_STATUSFILTERENABLE 0x8000 +#define KPCR_STATUSFILTERTYPE_SHIFT 12 +#define KPCR_COLFILTERENABLE0x0800 +#define KPCR_COLFILTERTYPE_SHIFT 8 +#define KPCR_ROWWIDTH_SHIFT 20 +#define KPCR_COLUMNWIDTH_SHIFT 16 + +#define KPIOR_OFFSET 0x0084 +#define KPIOR_ROWOCONTRL_SHIFT 24 +#define KPIOR_ROWOCONTRL_MASK0xFF00 +#define KPIOR_COLUMNOCONTRL_SHIFT16 +#define KPIOR_COLUMNOCONTRL_MASK 0x00FF +#define KPIOR_COLUMN_IO_DATA_SHIFT 0 + +#define KPEMR0_OFFSET0x0090 +#define KPEMR1_OFFSET0x0094 +#define KPEMR2_OFFSET0x0098 +#define KPEMR3_OFFSET0x009C +#define KPEMR_EDGETYPE_BOTH 3 + +#define KPSSR0_OFFSET0x00A0 +#define KPSSR1_OFFSET0x00A4 +#define KPSSRN_OFFSET(reg_n) (KPSSR0_OFFSET + (4 * reg_n)) +#define KPIMR0_OFFSET0x00B0 +#define KPIMR1_OFFSET0x00B4 +#define KPICR0_OFFSET0x00B8 +#define KPICR1_OFFSET0x00BC +#define KPICRN_OFFSET(reg_n) (KPICR0_OFFSET + (4 * reg_n)) +#define KPISR0_OFFSET0x00C0 +#define KPISR1_OFFSET
[PATCH v3 0/2] Add support for Broadcom keypad controller
This series of patchsets contains the Broadcom keypad controller driver and device tree binding documentation. Changes from v2: - changed binding to use autorepeat - stylistic updates Changes from v1: - updated dt documentation to remove to matrix-keymap.txt - removed bcm_kp_remove as it is not necessary - removed key-interrupt-trigger-type dt binding - added bcm_kp_report_keys and call to process key registers Scott Branden (2): Input: bcm-keypad: add device tree bindings Input: bcm-keypad: Add Broadcom keypad controller .../devicetree/bindings/input/brcm,bcm-keypad.txt | 108 + drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile| 1 + drivers/input/keyboard/bcm-keypad.c| 463 + 4 files changed, 582 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt create mode 100644 drivers/input/keyboard/bcm-keypad.c -- 2.3.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 v2 2/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
On 15-02-27 01:14 AM, Arnd Bergmann wrote: On Thursday 26 February 2015 14:26:02 Scott Branden wrote: On 15-02-26 12:15 PM, Arnd Bergmann wrote: On 15-02-25 11:17 AM, Arnd Bergmann wrote: On Wednesday 25 February 2015 10:16:24 Scott Branden wrote: This code was following examples of other open source drivers - bcm2835 and exynos both use cpu_relax. I'll have to look into this more to understand. The majority of the driver apparently use udelay(10) to wait, which is not much better but at least consistent. The cpu_relax() call probably gives better throughput. I don't understand why none of the drivers actually attempts to msleep(), but that may be because the delay is much too long. Can you find out what the expected latency is for new data to become available on your hardware? RNG generates at a nominal 1 Mbps. So to generate 32 bits of data takes approximately 32 us. The udelay(10) that the other drivers have seems about appropriate then, and we can independently think of a way to refine the interface. Please add a comment that explains the rate. Also, is there some kind of FIFO present in the hwrng device? If it can store close to 1ms work of data (1000 bits), you can just use an msleep(1) to wait for the pool to recover. FIFO is 512 bits. I will look as to whether we can live with 1/2 throughput. Another option would be to use usleep_range() with the exact amount of time to wait for, the lower bound being the minimum number of bytes asked for and the fifo size, the upper bound being the fifo size. 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: [PATCH v2 2/2] Input: bcm-keypad: Add Broadcom keypad controller
On 15-02-27 03:44 PM, Dmitry Torokhov wrote: Hi Scott, Mostly style nitpicks here... On Thu, Feb 26, 2015 at 08:08:49AM -0800, Scott Branden wrote: Add driver for Broadcom's keypad controller. Broadcom Keypad controller is used to interface a SoC with a matrix-type keypad device. The keypad controller supports multiple row and column lines. A key can be placed at each intersection of a unique row and a unique column. The keypad controller can sense a key-press and key-release and report the event using a interrupt to the cpu. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/bcm-keypad.c | 464 3 files changed, 475 insertions(+) create mode 100644 drivers/input/keyboard/bcm-keypad.c diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index a5d9b3f..3a0c0f2 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -676,4 +676,14 @@ config KEYBOARD_CAP11XX To compile this driver as a module, choose M here: the module will be called cap11xx. +config KEYBOARD_BCM + tristate "Broadcom keypad driver" + select INPUT_MATRIXKMAP + default ARCH_BCM_CYGNUS + help + Say Y here if you want to use Broadcom keypad. + + To compile this driver as a module, choose M here: the + module will be called bcm-keypad. + endif diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index febafa5..3cff8f6 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_ADP5589)+= adp5589-keys.o obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o +obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o obj-$(CONFIG_KEYBOARD_CAP11XX)+= cap11xx.o obj-$(CONFIG_KEYBOARD_CLPS711X) += clps711x-keypad.o diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c new file mode 100644 index 000..f229ac0 --- /dev/null +++ b/drivers/input/keyboard/bcm-keypad.c @@ -0,0 +1,464 @@ +/* + * Copyright (C) 2014 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_CLK_HZ 31250 +/* Repeat period (ms) */ +#define KEY_REPEAT_PERIOD 100 +/* First time press dly (ms) */ +#define KEY_REPEAT_DELAY400 +#define MAX_ROWS8 +#define MAX_COLS8 + +/* Register/field definitions */ +#define KPCR_OFFSET 0x0080 +#define KPCR_MODE 0x0002 +#define KPCR_MODE_SHIFT 1 +#define KPCR_MODE_MASK 1 +#define KPCR_ENABLE 0x0001 +#define KPCR_STATUSFILTERENABLE 0x8000 +#define KPCR_STATUSFILTERTYPE_SHIFT 12 +#define KPCR_COLFILTERENABLE0x0800 +#define KPCR_COLFILTERTYPE_SHIFT 8 +#define KPCR_ROWWIDTH_SHIFT 20 +#define KPCR_COLUMNWIDTH_SHIFT 16 + +#define KPIOR_OFFSET 0x0084 +#define KPIOR_ROWOCONTRL_SHIFT 24 +#define KPIOR_ROWOCONTRL_MASK0xFF00 +#define KPIOR_COLUMNOCONTRL_SHIFT16 +#define KPIOR_COLUMNOCONTRL_MASK 0x00FF +#define KPIOR_COLUMN_IO_DATA_SHIFT 0 + +#define KPEMR0_OFFSET0x0090 +#define KPEMR1_OFFSET0x0094 +#define KPEMR2_OFFSET0x0098 +#define KPEMR3_OFFSET0x009C +#define KPEMR_EDGETYPE_BOTH 3 + +#define KPSSR0_OFFSET0x00A0 +#define KPSSR1_OFFSET0x00A4 +#define KPSSRN_OFFSET(reg_n) (KPSSR0_OFFSET + (4 * reg_n)) +#define KPIMR0_OFFSET0x00B0 +#define KPIMR1_OFFSET0x00B4 +#define KPICR0_OFFSET0x00B8 +#define KPICR1_OFFSET0x00BC +#d
Re: [PATCH v2 1/2] Input: bcm-keypad: add device tree bindings
Hi Dmitry, On 15-02-27 03:39 PM, Dmitry Torokhov wrote: Hi Scott, On Thu, Feb 26, 2015 at 08:08:48AM -0800, Scott Branden wrote: Documents the Broadcom keypad controller device tree bindings. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- .../devicetree/bindings/input/brcm,bcm-keypad.txt | 108 + 1 file changed, 108 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt diff --git a/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt new file mode 100644 index 000..e16bb2d --- /dev/null +++ b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt @@ -0,0 +1,108 @@ +* Broadcom Keypad Controller device tree bindings + +Broadcom Keypad controller is used to interface a SoC with a matrix-type +keypad device. The keypad controller supports multiple row and column lines. +A key can be placed at each intersection of a unique row and a unique column. +The keypad controller can sense a key-press and key-release and report the +event using a interrupt to the cpu. + +This binding is based on the matrix-keymap binding with the following +changes: + +keypad,num-rows and keypad,num-columns are required. + +Required SoC Specific Properties: +- compatible: should be "brcm,bcm-keypad" + +- reg: physical base address of the controller and length of memory mapped + region. + +- interrupts: The interrupt number to the cpu. + +Board Specific Properties: +- keypad,num-rows: Number of row lines connected to the keypad + controller. + +- keypad,num-columns: Number of column lines connected to the + keypad controller. + +- col-debounce-filter-period: The debounce period for the Column filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- status-debounce-filter-period: The debounce period for the Status filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- row-output-enabled: An optional property indicating whether the row or + column is being used as output. If specified the row is being used + as the output. Else defaults to column. + +- pull-up-enabled: An optional property indicating the Keypad scan mode. + If specified implies the keypad scan pull-up has been enabled. + +- linux,keypad-no-autorepeat: An optional property indicating to + not enable autorepeat feature. Unfortunately we've accumulated a lot of bindings for turning autorepeat on or off, I would prefer if we standardize on what gpio-keys is doing and use "autorepeat" (no "linux,") for new drivers. OK. I can change it. Thanks. -- 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/2] Input: bcm-keypad: Add Broadcom keypad controller
Yes, will correct. Thanks. On 15-02-28 06:16 AM, Paul Bolle wrote: On Thu, 2015-02-26 at 08:08 -0800, Scott Branden wrote: Add driver for Broadcom's keypad controller. Broadcom Keypad controller is used to interface a SoC with a matrix-type keypad device. The keypad controller supports multiple row and column lines. A key can be placed at each intersection of a unique row and a unique column. The keypad controller can sense a key-press and key-release and report the event using a interrupt to the cpu. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/bcm-keypad.c | 464 3 files changed, 475 insertions(+) create mode 100644 drivers/input/keyboard/bcm-keypad.c License nit follows. diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c new file mode 100644 index 000..f229ac0 --- /dev/null +++ b/drivers/input/keyboard/bcm-keypad.c @@ -0,0 +1,464 @@ +/* + * Copyright (C) 2014 Broadcom Corporation + * + * 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 version 2. This states that the license is GPL v2 only. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ [...] +MODULE_LICENSE("GPL"); So you probably want MODULE_LICENSE("GPL v2"); Paul Bolle -- 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/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
Hi Arnd, Latency is 32 us for 32bits of data - commented inline. What delay call do you recommend in this case? On 15-02-26 12:15 PM, Arnd Bergmann wrote: On Thursday 26 February 2015 11:37:20 Scott Branden wrote: Response inline. On 15-02-25 11:17 AM, Arnd Bergmann wrote: On Wednesday 25 February 2015 10:16:24 Scott Branden wrote: This adds a driver for random number generator present on Broadcom IPROC devices. Reviewed-by: Ray Jui Signed-off-by: Scott Branden The driver looks reasonable overall, I have just one question about something that sticks out: +while ((num_remaining > 0) && time_before(jiffies, idle_endtime)) { ... + +/* Are there any random numbers available? */ +if ((ioread32(rng_base + RNG_FIFO_COUNT_OFFSET) & +RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK) > 0) { ... +} else { +if (!wait) +/* Cannot wait, return immediately */ +return max - num_remaining; + +/* Can wait, give others chance to run */ +cpu_relax(); +} +} + It looks like you do a busy-loop around cpu_relax here if asked to wait. Is this intentional? I would normally expect either cond_resched() or some msleep() instead. This code was following examples of other open source drivers - bcm2835 and exynos both use cpu_relax. I'll have to look into this more to understand. The majority of the driver apparently use udelay(10) to wait, which is not much better but at least consistent. The cpu_relax() call probably gives better throughput. I don't understand why none of the drivers actually attempts to msleep(), but that may be because the delay is much too long. Can you find out what the expected latency is for new data to become available on your hardware? RNG generates at a nominal 1 Mbps. So to generate 32 bits of data takes approximately 32 us. 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: [PATCH v2 2/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
Response inline. On 15-02-25 11:17 AM, Arnd Bergmann wrote: On Wednesday 25 February 2015 10:16:24 Scott Branden wrote: This adds a driver for random number generator present on Broadcom IPROC devices. Reviewed-by: Ray Jui Signed-off-by: Scott Branden The driver looks reasonable overall, I have just one question about something that sticks out: + while ((num_remaining > 0) && time_before(jiffies, idle_endtime)) { ... + + /* Are there any random numbers available? */ + if ((ioread32(rng_base + RNG_FIFO_COUNT_OFFSET) & + RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK) > 0) { ... + } else { + if (!wait) + /* Cannot wait, return immediately */ + return max - num_remaining; + + /* Can wait, give others chance to run */ + cpu_relax(); + } + } + It looks like you do a busy-loop around cpu_relax here if asked to wait. Is this intentional? I would normally expect either cond_resched() or some msleep() instead. This code was following examples of other open source drivers - bcm2835 and exynos both use cpu_relax. I'll have to look into this more to understand. 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: [PATCH 0/4] Add support for IPROC SDHCI controller
Hi Chris, I have not heard any more feedback on this patchset. Is it in your queue to review or merge into your tree? Thanks, Scott On 15-02-09 04:06 PM, Scott Branden wrote: This series of patchsets contains the IPROC SDHCI driver used in a series of Broadcom SoCs Quirks are also added to support this controller. Corneliu Doban (1): mmc: sdhci: do not set AUTO_CMD12 for multi-block CMD53 Scott Branden (3): mmc: sdhci: add quirk for ACMD23 broken mmc: sdhci-iproc: add IPROC SDHCI driver mmc: sdhci-iproc: add device tree bindings .../devicetree/bindings/mmc/brcm,sdhci-iproc.txt | 23 ++ drivers/mmc/host/Kconfig | 14 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-iproc.c | 241 + drivers/mmc/host/sdhci.c | 7 +- include/linux/mmc/sdhci.h | 2 + 6 files changed, 286 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt create mode 100644 drivers/mmc/host/sdhci-iproc.c -- 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 1/2] Input: bcm-keypad: add device tree bindings
Hi Dmitry, Thanks for the update of no need to change any of dt-binding prefixes. I just sent out a v2 patch addressing all of your other comments. On 15-02-23 09:49 AM, Dmitry Torokhov wrote: Hi Scott, On Sun, Feb 15, 2015 at 09:17:51PM -0800, Dmitry Torokhov wrote: On Sat, Feb 14, 2015 at 08:49:15AM -0800, Scott Branden wrote: On 15-02-09 04:51 PM, Dmitry Torokhov wrote: On Mon, Feb 09, 2015 at 04:07:40PM -0800, Scott Branden wrote: + +- col-debounce-filter-period: The debounce period for the Column filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- status-debounce-filter-period: The debounce period for the Status filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 I could swear device-specific properties should be in form of , to ensure it won't clash with changes on subsystem level later on. Device-tree folks, what say you? I see examples with and without vendor-prefix. qcom,pm8xxx-keypad.txt does not have prefixes st-keyscan.txt does have a prefix I can't find any documented guidelines for this. As I mentioned I'll try to get clarification on this. I have chatted with a couple of people on this and it is acceptable to omit vendor prefix in bindings when we are using a specific driver like we have here (i.e. when driver's compatible string already includes vendor prefix). Vendor prefixes on properties are required when we augment a generic driver's binding. So the above 2 entries are fine as is. Thanks. -- 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/2] Add support for Broadcom keypad controller
This series of patchsets contains the Broadcom keypad controller driver and device tree binding documentation. Changes from v1: - updated dt documentation to remove to matrix-keymap.txt - removed bcm_kp_remove as it is not necessary - removed key-interrupt-trigger-type dt binding - added bcm_kp_report_keys and call to process key registers Scott Branden (2): Input: bcm-keypad: add device tree bindings Input: bcm-keypad: Add Broadcom keypad controller .../devicetree/bindings/input/brcm,bcm-keypad.txt | 108 + drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile| 1 + drivers/input/keyboard/bcm-keypad.c| 464 + 4 files changed, 583 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt create mode 100644 drivers/input/keyboard/bcm-keypad.c -- 2.3.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/2] Input: bcm-keypad: Add Broadcom keypad controller
Add driver for Broadcom's keypad controller. Broadcom Keypad controller is used to interface a SoC with a matrix-type keypad device. The keypad controller supports multiple row and column lines. A key can be placed at each intersection of a unique row and a unique column. The keypad controller can sense a key-press and key-release and report the event using a interrupt to the cpu. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/bcm-keypad.c | 464 3 files changed, 475 insertions(+) create mode 100644 drivers/input/keyboard/bcm-keypad.c diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index a5d9b3f..3a0c0f2 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -676,4 +676,14 @@ config KEYBOARD_CAP11XX To compile this driver as a module, choose M here: the module will be called cap11xx. +config KEYBOARD_BCM + tristate "Broadcom keypad driver" + select INPUT_MATRIXKMAP + default ARCH_BCM_CYGNUS + help + Say Y here if you want to use Broadcom keypad. + + To compile this driver as a module, choose M here: the + module will be called bcm-keypad. + endif diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index febafa5..3cff8f6 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_ADP5589)+= adp5589-keys.o obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o +obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o obj-$(CONFIG_KEYBOARD_BFIN)+= bf54x-keys.o obj-$(CONFIG_KEYBOARD_CAP11XX) += cap11xx.o obj-$(CONFIG_KEYBOARD_CLPS711X)+= clps711x-keypad.o diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c new file mode 100644 index 000..f229ac0 --- /dev/null +++ b/drivers/input/keyboard/bcm-keypad.c @@ -0,0 +1,464 @@ +/* + * Copyright (C) 2014 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_CLK_HZ 31250 +/* Repeat period (ms) */ +#define KEY_REPEAT_PERIOD 100 +/* First time press dly (ms) */ +#define KEY_REPEAT_DELAY400 +#define MAX_ROWS8 +#define MAX_COLS8 + +/* Register/field definitions */ +#define KPCR_OFFSET 0x0080 +#define KPCR_MODE 0x0002 +#define KPCR_MODE_SHIFT 1 +#define KPCR_MODE_MASK 1 +#define KPCR_ENABLE 0x0001 +#define KPCR_STATUSFILTERENABLE 0x8000 +#define KPCR_STATUSFILTERTYPE_SHIFT 12 +#define KPCR_COLFILTERENABLE0x0800 +#define KPCR_COLFILTERTYPE_SHIFT 8 +#define KPCR_ROWWIDTH_SHIFT 20 +#define KPCR_COLUMNWIDTH_SHIFT 16 + +#define KPIOR_OFFSET 0x0084 +#define KPIOR_ROWOCONTRL_SHIFT 24 +#define KPIOR_ROWOCONTRL_MASK0xFF00 +#define KPIOR_COLUMNOCONTRL_SHIFT16 +#define KPIOR_COLUMNOCONTRL_MASK 0x00FF +#define KPIOR_COLUMN_IO_DATA_SHIFT 0 + +#define KPEMR0_OFFSET0x0090 +#define KPEMR1_OFFSET0x0094 +#define KPEMR2_OFFSET0x0098 +#define KPEMR3_OFFSET0x009C +#define KPEMR_EDGETYPE_BOTH 3 + +#define KPSSR0_OFFSET0x00A0 +#define KPSSR1_OFFSET0x00A4 +#define KPSSRN_OFFSET(reg_n) (KPSSR0_OFFSET + (4 * reg_n)) +#define KPIMR0_OFFSET0x00B0 +#define KPIMR1_OFFSET0x00B4 +#define KPICR0_OFFSET0x00B8 +#define KPICR1_OFFSET0x00BC +#define KPICRN_OFFSET(reg_n) (KPICR0_OFFSET + (4 * reg_n)) +#define KPISR0_OFFSET0x00C0 +#define KPISR1_OFFSET
[PATCH v2 1/2] Input: bcm-keypad: add device tree bindings
Documents the Broadcom keypad controller device tree bindings. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- .../devicetree/bindings/input/brcm,bcm-keypad.txt | 108 + 1 file changed, 108 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt diff --git a/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt new file mode 100644 index 000..e16bb2d --- /dev/null +++ b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt @@ -0,0 +1,108 @@ +* Broadcom Keypad Controller device tree bindings + +Broadcom Keypad controller is used to interface a SoC with a matrix-type +keypad device. The keypad controller supports multiple row and column lines. +A key can be placed at each intersection of a unique row and a unique column. +The keypad controller can sense a key-press and key-release and report the +event using a interrupt to the cpu. + +This binding is based on the matrix-keymap binding with the following +changes: + +keypad,num-rows and keypad,num-columns are required. + +Required SoC Specific Properties: +- compatible: should be "brcm,bcm-keypad" + +- reg: physical base address of the controller and length of memory mapped + region. + +- interrupts: The interrupt number to the cpu. + +Board Specific Properties: +- keypad,num-rows: Number of row lines connected to the keypad + controller. + +- keypad,num-columns: Number of column lines connected to the + keypad controller. + +- col-debounce-filter-period: The debounce period for the Column filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- status-debounce-filter-period: The debounce period for the Status filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- row-output-enabled: An optional property indicating whether the row or + column is being used as output. If specified the row is being used + as the output. Else defaults to column. + +- pull-up-enabled: An optional property indicating the Keypad scan mode. + If specified implies the keypad scan pull-up has been enabled. + +- linux,keypad-no-autorepeat: An optional property indicating to + not enable autorepeat feature. + +- linux,keymap: The keymap for keys as described in the binding document + devicetree/bindings/input/matrix-keymap.txt. + +Example: +#include "dt-bindings/input/input.h" + +/ { + keypad: keypad@180ac000 { + /* Required SoC specific properties */ + compatible = "brcm,bcm-keypad"; + + /* Required Board specific properties */ + keypad,num-rows = <5>; + keypad,num-columns = <5>; + status = "okay"; + + linux,keymap = ; + + /* Optional board specific properties */ + col-debounce-filter-period = <5>; + row-output-enabled; + pull-up-enabled; + + }; +}; -- 2.3.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/2] hwrng: iproc-rng200 - Add device tree bindings
Documents the IPROC random number generator device tree bindings used in some Broadcom chipsets. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- .../devicetree/bindings/hwrng/brcm,iproc-rng200.txt | 12 1 file changed, 12 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt diff --git a/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt b/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt new file mode 100644 index 000..e25a456 --- /dev/null +++ b/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt @@ -0,0 +1,12 @@ +HWRNG support for the iproc-rng200 driver + +Required properties: +- compatible : "brcm,iproc-rng200" +- reg : base address and size of control register block + +Example: + +rng { +compatible = "brcm,iproc-rng200"; +reg = <0x18032000 0x28>; +}; -- 2.3.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/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
This adds a driver for random number generator present on Broadcom IPROC devices. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/char/hw_random/Kconfig| 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/iproc-rng200.c | 239 ++ 3 files changed, 253 insertions(+) create mode 100644 drivers/char/hw_random/iproc-rng200.c diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index de57b38..f48cf11 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -101,6 +101,19 @@ config HW_RANDOM_BCM2835 If unsure, say Y. +config HW_RANDOM_IPROC_RNG200 + tristate "Broadcom iProc RNG200 support" + depends on ARCH_BCM_IPROC + default HW_RANDOM + ---help--- + This driver provides kernel-side support for the RNG200 + hardware found on the Broadcom iProc SoCs. + + To compile this driver as a module, choose M here: the + module will be called iproc-rng200 + + If unsure, say Y. + config HW_RANDOM_GEODE tristate "AMD Geode HW Random Number Generator support" depends on X86_32 && PCI diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index 0b4cd57..055bb01 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile @@ -28,5 +28,6 @@ obj-$(CONFIG_HW_RANDOM_POWERNV) += powernv-rng.o obj-$(CONFIG_HW_RANDOM_EXYNOS) += exynos-rng.o obj-$(CONFIG_HW_RANDOM_TPM) += tpm-rng.o obj-$(CONFIG_HW_RANDOM_BCM2835) += bcm2835-rng.o +obj-$(CONFIG_HW_RANDOM_IPROC_RNG200) += iproc-rng200.o obj-$(CONFIG_HW_RANDOM_MSM) += msm-rng.o obj-$(CONFIG_HW_RANDOM_XGENE) += xgene-rng.o diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c new file mode 100644 index 000..4643aa9 --- /dev/null +++ b/drivers/char/hw_random/iproc-rng200.c @@ -0,0 +1,239 @@ +/* +* Copyright (C) 2014 Broadcom Corporation +* +* 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 version 2. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ +/* + * DESCRIPTION: The Broadcom iProc RNG200 Driver + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Registers */ +#define RNG_CTRL_OFFSET0x00 +#define RNG_CTRL_RNG_RBGEN_MASK0x1FFF +#define RNG_CTRL_RNG_RBGEN_ENABLE 0x0001 +#define RNG_CTRL_RNG_RBGEN_DISABLE 0x + +#define RNG_SOFT_RESET_OFFSET 0x04 +#define RNG_SOFT_RESET_RNG_SOFT_RESET_MASK 0x0001 +#define RNG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE 0x0001 +#define RNG_SOFT_RESET_RNG_SOFT_RESET_CLEAR0x + +#define RBG_SOFT_RESET_OFFSET 0x08 +#define RBG_SOFT_RESET_RNG_SOFT_RESET_MASK 0x0001 +#define RBG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE 0x0001 +#define RBG_SOFT_RESET_RNG_SOFT_RESET_CLEAR0x + +#define RNG_INT_STATUS_OFFSET 0x18 +#define RNG_INT_STATUS_MASTER_FAIL_LOCKOUT_IRQ_MASK0x8000 +#define RNG_INT_STATUS_STARTUP_TRANSITIONS_MET_IRQ_MASK0x0002 +#define RNG_INT_STATUS_NIST_FAIL_IRQ_MASK 0x0020 +#define RNG_INT_STATUS_TOTAL_BITS_COUNT_IRQ_MASK 0x0001 + +#define RNG_FIFO_DATA_OFFSET 0x20 + +#define RNG_FIFO_COUNT_OFFSET 0x24 +#define RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK 0x00FF + +static void iproc_rng200_restart(void __iomem *rng_base) +{ + uint32_t val; + + /* Disable RBG */ + val = ioread32(rng_base + RNG_CTRL_OFFSET); + val &= ~RNG_CTRL_RNG_RBGEN_MASK; + val |= RNG_CTRL_RNG_RBGEN_DISABLE; + iowrite32(val, rng_base + RNG_CTRL_OFFSET); + + /* Clear all interrupt status */ + iowrite32(0xUL, rng_base + RNG_INT_STATUS_OFFSET); + + /* Reset RNG and RBG */ + val = ioread32(rng_base + RBG_SOFT_RESET_OFFSET); + val &= ~RBG_SOFT_RESET_RNG_SOFT_RESET_MASK; + val |= RBG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE; + iowrite32(val, rng_base + RBG_SOFT_RESET_OFFSET); + + val = ioread32(rng_base + RNG_SOFT_RESET_OFFSET); + val &= ~RNG_SOFT_RESET_RNG_SOFT_RESET_MASK; + val |= RNG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE; + iowrite32(val, rng_base + RNG_SOFT_RESET_OFFSET); + + val = ioread32(rng_base + RNG_SOFT_RESET_OFFSET); + val &
[PATCH v2 0/2] Add support for Broadcom RNG200
This series of patchsets contains the Broadcom Random Number Generator driver and device tree binding documentation. Changes from v1: added \n to 2 dev_err messages Scott Branden (2): hwrng: iproc-rng200 - Add device tree bindings hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver .../bindings/hwrng/brcm,iproc-rng200.txt | 12 ++ drivers/char/hw_random/Kconfig | 13 ++ drivers/char/hw_random/Makefile| 1 + drivers/char/hw_random/iproc-rng200.c | 239 + 4 files changed, 265 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt create mode 100644 drivers/char/hw_random/iproc-rng200.c -- 2.3.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 2/2] Input: bcm-keypad: Add Broadcom keypad controller
Hi Dmitry, Good review. Thanks. Commented inline. On 15-02-09 05:02 PM, Dmitry Torokhov wrote: Hi Scott, On Mon, Feb 09, 2015 at 04:07:41PM -0800, Scott Branden wrote: Add driver for Broadcom's keypad controller. Broadcom Keypad controller is used to interface a SoC with a matrix-type keypad device. The keypad controller supports multiple row and column lines. A key can be placed at each intersection of a unique row and a unique column. The keypad controller can sense a key-press and key-release and report the event using a interrupt to the cpu. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/bcm-keypad.c | 489 3 files changed, 500 insertions(+) create mode 100644 drivers/input/keyboard/bcm-keypad.c diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index a5d9b3f..3a0c0f2 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -676,4 +676,14 @@ config KEYBOARD_CAP11XX To compile this driver as a module, choose M here: the module will be called cap11xx. +config KEYBOARD_BCM + tristate "Broadcom keypad driver" + select INPUT_MATRIXKMAP + default ARCH_BCM_CYGNUS + help + Say Y here if you want to use Broadcom keypad. + + To compile this driver as a module, choose M here: the + module will be called bcm-keypad. + endif diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index febafa5..3cff8f6 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_ADP5589)+= adp5589-keys.o obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o +obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o obj-$(CONFIG_KEYBOARD_CAP11XX)+= cap11xx.o obj-$(CONFIG_KEYBOARD_CLPS711X) += clps711x-keypad.o diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c new file mode 100644 index 000..b2c4bb7 --- /dev/null +++ b/drivers/input/keyboard/bcm-keypad.c @@ -0,0 +1,489 @@ +/* + * Copyright (C) 2014 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_CLK_HZ 31250 +/* Repeat period (ms) */ +#define KEY_REPEAT_PERIOD 100 +/* First time press dly (ms) */ +#define KEY_REPEAT_DELAY400 +#define MAX_ROWS8 +#define MAX_COLS8 + +/* Register/field definitions */ +#define KPCR_OFFSET 0x0080 +#define KPCR_MODE 0x0002 +#define KPCR_MODE_SHIFT 1 +#define KPCR_MODE_MASK 1 +#define KPCR_ENABLE 0x0001 +#define KPCR_STATUSFILTERENABLE 0x8000 +#define KPCR_STATUSFILTERTYPE_SHIFT 12 +#define KPCR_COLFILTERENABLE0x0800 +#define KPCR_COLFILTERTYPE_SHIFT 8 +#define KPCR_ROWWIDTH_SHIFT 20 +#define KPCR_COLUMNWIDTH_SHIFT 16 + +#define KPIOR_OFFSET 0x0084 +#define KPIOR_ROWOCONTRL_SHIFT 24 +#define KPIOR_ROWOCONTRL_MASK0xFF00 +#define KPIOR_COLUMNOCONTRL_SHIFT16 +#define KPIOR_COLUMNOCONTRL_MASK 0x00FF +#define KPIOR_COLUMN_IO_DATA_SHIFT 0 + +#define KPEMR0_OFFSET0x0090 +#define KPEMR1_OFFSET0x0094 +#define KPEMR2_OFFSET0x0098 +#define KPEMR3_OFFSET0x009C +#define KPEMR_EDGETYPE_MAX 3 + +#define KPSSR0_OFFSET0x00A0 +#define KPSSR1_OFFSET0x00A4 +#define KPIMR0_OFFSET0x00B0 +#define KPIMR1_OFFSET0x00B4 +#define KPICR0_OFFSET0x00B8 +#define KPICR1_OFFSET0x00BC +#define KPISR0_OFFSET0x00
Re: [PATCH 1/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
I didn't read this properly. Will add \n in the dev_err messages. Thanks, Scott On 15-02-14 08:36 AM, Scott Branden wrote: Hi Joe, I really don't see the missing terminating newlines in the patch or source code. The lines look the same as every other line??? Regards, Scott On 15-02-09 04:27 PM, Joe Perches wrote: On Mon, 2015-02-09 at 16:07 -0800, Scott Branden wrote: This adds a driver for random number generator present on Broadcom IPROC devices. trivia: diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c [] +static int iproc_rng200_probe(struct platform_device *pdev) +{ [] +if (!res) { +dev_err(dev, "failed to get rng resources"); Missing terminating newline: dev_err(dev, "failed to get rng resources\n"); +rng_base = devm_ioremap_resource(dev, res); +if (!rng_base) { +dev_err(dev, "failed to remap rng regs"); here too. -- 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 1/2] Input: bcm-keypad: add device tree bindings
Hi Dmitry, Comments inline. I still have an issue with vendor prefix as there are not documented guidelines I can find in this area? On 15-02-09 04:51 PM, Dmitry Torokhov wrote: Hi Scott, On Mon, Feb 09, 2015 at 04:07:40PM -0800, Scott Branden wrote: Documents the Broadcom keypad controller device tree bindings. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- .../devicetree/bindings/input/brcm,bcm-keypad.txt | 118 + 1 file changed, 118 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt diff --git a/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt new file mode 100644 index 000..645829d --- /dev/null +++ b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt @@ -0,0 +1,118 @@ +* Broadcom Keypad Controller device tree bindings + +Broadcom Keypad controller is used to interface a SoC with a matrix-type +keypad device. The keypad controller supports multiple row and column lines. +A key can be placed at each intersection of a unique row and a unique column. +The keypad controller can sense a key-press and key-release and report the +event using a interrupt to the cpu. + +This binding is based on the matrix-keymap binding with the following +changes: + +keypad,num-rows and keypad,num-columns are required. + +Required SoC Specific Properties: +- compatible: should be "brcm,bcm-keypad" + +- reg: physical base address of the controller and length of memory mapped + region. + +- interrupts: The interrupt number to the cpu. + +Board Specific Properties: +- keypad,num-rows: Number of row lines connected to the keypad + controller. + +- keypad,num-columns: Number of column lines connected to the + keypad controller. + +- key-interrupt-trigger-type: The type of interrupt trigger asociated with the Keypad matrix. + + KEYPAD_INTERRUPT_NO_TRIGGER = 0 + KEYPAD_INTERRUPT_RISING_EDGE= 1 + KEYPAD_INTERRUPT_FALLING_EDGE = 2 + KEYPAD_INTERRUPT_BOTH_EDGES = 3 Can we get this data from the interrupt spec? I don't understand your question. Could you elaborate? But, looking at this closer this determines when the hardware should generate interrupts. I think we would always need to set it to both edges and this binding option can probably we removed? + +- col-debounce-filter-period: The debounce period for the Column filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- status-debounce-filter-period: The debounce period for the Status filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 I could swear device-specific properties should be in form of , to ensure it won't clash with changes on subsystem level later on. Device-tree folks, what say you? I see examples with and without vendor-prefix. qcom,pm8xxx-keypad.txt does not have prefixes st-keyscan.txt does have a prefix I can't find any documented guidelines for this. Clash changes should not happen because as new standard properties are added the drivers should be adjusted to use the new dt-bindings? + +- row-output-enabled: An optional property indicating whether the row or + column is being used as output. If specified the row is being used + as the output. Else defaults to column. + +- pull-up-enabled: An optional property indicating the Keypad scan mode. + If specified implies the keypad scan pull-up has been enabled. + +- Keys represented as child nodes: Each key connected to the keypad + controller is represented as a child node to the keypad controller + device node and should include the following properties. + - row: the row number to which the key is connected. + - column: the column number to which the key is connected. + - code: the key-code to be reported when the key is pressed +and released. That does not seem to be right, linux,keymap is a list, not a subtree. I'd simply refer to Documentation/devicetree/bindings/input/matrix-keymap.txt for details. Yes, we moved to matrix-keymap and forgot to update this documentation. Will correct - thanks. + +Example: +#include "dt-bindings/input/input.h" + +/ { + keypad: keypad@180ac000 { + /* Required SoC specific properties */ + compatible = "brcm,bcm-keypad"; + +
Re: [PATCH 1/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
Hi Joe, I really don't see the missing terminating newlines in the patch or source code. The lines look the same as every other line??? Regards, Scott On 15-02-09 04:27 PM, Joe Perches wrote: On Mon, 2015-02-09 at 16:07 -0800, Scott Branden wrote: This adds a driver for random number generator present on Broadcom IPROC devices. trivia: diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c [] +static int iproc_rng200_probe(struct platform_device *pdev) +{ [] + if (!res) { + dev_err(dev, "failed to get rng resources"); Missing terminating newline: dev_err(dev, "failed to get rng resources\n"); + rng_base = devm_ioremap_resource(dev, res); + if (!rng_base) { + dev_err(dev, "failed to remap rng regs"); here too. -- 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/2] Add support for Broadcom RNG200
This series of patchsets contains the Broadcom Random Number Generator driver and device tree binding documentation. Scott Branden (2): hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver hwrng: iproc-rng200 - Add device tree bindings .../bindings/hwrng/brcm,iproc-rng200.txt | 12 ++ drivers/char/hw_random/Kconfig | 13 ++ drivers/char/hw_random/Makefile| 1 + drivers/char/hw_random/iproc-rng200.c | 239 + 4 files changed, 265 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt create mode 100644 drivers/char/hw_random/iproc-rng200.c -- 2.2.2 -- 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/4] mmc: sdhci: add quirk for ACMD23 broken
Add quirk to handle broken auto-CMD23. Some controllers do not respond after the first auto-CMD23 is issued. This allows CMD23 to still work (mandatory for the faster UHS-I mode) rather than disabling CMD23 entirely via SDHCI_QUIRK2_HOST_NO_CMD23. Signed-off by: Corneliu Doban Signed-off-by: Scott Branden Signed-off-by: Scott Branden --- drivers/mmc/host/sdhci.c | 3 ++- include/linux/mmc/sdhci.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index f1a488e..fcf78ab 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3085,7 +3085,8 @@ int sdhci_add_host(struct sdhci_host *host) /* Auto-CMD23 stuff only works in ADMA or PIO. */ if ((host->version >= SDHCI_SPEC_300) && ((host->flags & SDHCI_USE_ADMA) || -!(host->flags & SDHCI_USE_SDMA))) { +!(host->flags & SDHCI_USE_SDMA)) && +!(host->quirks2 & SDHCI_QUIRK2_ACMD23_BROKEN)) { host->flags |= SDHCI_AUTO_CMD23; DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc)); } else { diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index f767a0d..a29e9bb 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -106,6 +106,8 @@ struct sdhci_host { #define SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD (1<<10) /* Capability register bit-63 indicates HS400 support */ #define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 (1<<11) +/* Controller broken with using ACMD23 */ +#define SDHCI_QUIRK2_ACMD23_BROKEN (1<<12) int irq;/* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ -- 2.2.2 -- 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/4] mmc: sdhci: do not set AUTO_CMD12 for multi-block CMD53
From: Corneliu Doban For CMD53 in block mode, the host does not need to stop the transfer, as it stops when the block count (present in CMD53) is reached. Signed-off-by: Corneliu Doban Signed-off-by: Scott Branden --- drivers/mmc/host/sdhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index fcf78ab..f35d413 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "sdhci.h" @@ -934,7 +935,8 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host, * If we are sending CMD23, CMD12 never gets sent * on successful completion (so no Auto-CMD12). */ - if (!host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD12)) + if (!host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD12) && + (cmd->opcode != SD_IO_RW_EXTENDED)) mode |= SDHCI_TRNS_AUTO_CMD12; else if (host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD23)) { mode |= SDHCI_TRNS_AUTO_CMD23; -- 2.2.2 -- 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/4] Add support for IPROC SDHCI controller
This series of patchsets contains the IPROC SDHCI driver used in a series of Broadcom SoCs Quirks are also added to support this controller. Corneliu Doban (1): mmc: sdhci: do not set AUTO_CMD12 for multi-block CMD53 Scott Branden (3): mmc: sdhci: add quirk for ACMD23 broken mmc: sdhci-iproc: add IPROC SDHCI driver mmc: sdhci-iproc: add device tree bindings .../devicetree/bindings/mmc/brcm,sdhci-iproc.txt | 23 ++ drivers/mmc/host/Kconfig | 14 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-iproc.c | 241 + drivers/mmc/host/sdhci.c | 7 +- include/linux/mmc/sdhci.h | 2 + 6 files changed, 286 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt create mode 100644 drivers/mmc/host/sdhci-iproc.c -- 2.2.2 -- 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 4/4] mmc: sdhci-iproc: add device tree bindings
Add device tree binding documentation for IPROC SDHCI driver. Acked-by: Ray Jui Signed-off-by: Corneliu Doban Signed-off-by: Scott Branden --- .../devicetree/bindings/mmc/brcm,sdhci-iproc.txt | 23 ++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt new file mode 100644 index 000..72cc9cc --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt @@ -0,0 +1,23 @@ +Broadcom IPROC SDHCI controller + +This file documents differences between the core properties described +by mmc.txt and the properties that represent the IPROC SDHCI controller. + +Required properties: +- compatible : Should be "brcm,sdhci-iproc-cygnus". +- clocks : The clock feeding the SDHCI controller. + +Optional properties: + - sdhci,auto-cmd12: specifies that controller should use auto CMD12. + +Example: + +sdhci0: sdhci@0x18041000 { + compatible = "brcm,sdhci-iproc-cygnus"; + reg = <0x18041000 0x100>; + interrupts = ; + clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>; + bus-width = <4>; + sdhci,auto-cmd12; + no-1-8-v; +}; -- 2.2.2 -- 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/2] Add support for Broadcom keypad controller
This series of patchsets contains the Broadcom keypad controller driver and device tree binding documentation. Scott Branden (2): Input: bcm-keypad: add device tree bindings Input: bcm-keypad: Add Broadcom keypad controller .../devicetree/bindings/input/brcm,bcm-keypad.txt | 118 + drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile| 1 + drivers/input/keyboard/bcm-keypad.c| 489 + 4 files changed, 618 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt create mode 100644 drivers/input/keyboard/bcm-keypad.c -- 2.2.2 -- 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] Input: bcm-keypad: Add Broadcom keypad controller
Add driver for Broadcom's keypad controller. Broadcom Keypad controller is used to interface a SoC with a matrix-type keypad device. The keypad controller supports multiple row and column lines. A key can be placed at each intersection of a unique row and a unique column. The keypad controller can sense a key-press and key-release and report the event using a interrupt to the cpu. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/input/keyboard/Kconfig | 10 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/bcm-keypad.c | 489 3 files changed, 500 insertions(+) create mode 100644 drivers/input/keyboard/bcm-keypad.c diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index a5d9b3f..3a0c0f2 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -676,4 +676,14 @@ config KEYBOARD_CAP11XX To compile this driver as a module, choose M here: the module will be called cap11xx. +config KEYBOARD_BCM + tristate "Broadcom keypad driver" + select INPUT_MATRIXKMAP + default ARCH_BCM_CYGNUS + help + Say Y here if you want to use Broadcom keypad. + + To compile this driver as a module, choose M here: the + module will be called bcm-keypad. + endif diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index febafa5..3cff8f6 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_ADP5589)+= adp5589-keys.o obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o +obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o obj-$(CONFIG_KEYBOARD_BFIN)+= bf54x-keys.o obj-$(CONFIG_KEYBOARD_CAP11XX) += cap11xx.o obj-$(CONFIG_KEYBOARD_CLPS711X)+= clps711x-keypad.o diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c new file mode 100644 index 000..b2c4bb7 --- /dev/null +++ b/drivers/input/keyboard/bcm-keypad.c @@ -0,0 +1,489 @@ +/* + * Copyright (C) 2014 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_CLK_HZ 31250 +/* Repeat period (ms) */ +#define KEY_REPEAT_PERIOD 100 +/* First time press dly (ms) */ +#define KEY_REPEAT_DELAY400 +#define MAX_ROWS8 +#define MAX_COLS8 + +/* Register/field definitions */ +#define KPCR_OFFSET 0x0080 +#define KPCR_MODE 0x0002 +#define KPCR_MODE_SHIFT 1 +#define KPCR_MODE_MASK 1 +#define KPCR_ENABLE 0x0001 +#define KPCR_STATUSFILTERENABLE 0x8000 +#define KPCR_STATUSFILTERTYPE_SHIFT 12 +#define KPCR_COLFILTERENABLE0x0800 +#define KPCR_COLFILTERTYPE_SHIFT 8 +#define KPCR_ROWWIDTH_SHIFT 20 +#define KPCR_COLUMNWIDTH_SHIFT 16 + +#define KPIOR_OFFSET 0x0084 +#define KPIOR_ROWOCONTRL_SHIFT 24 +#define KPIOR_ROWOCONTRL_MASK0xFF00 +#define KPIOR_COLUMNOCONTRL_SHIFT16 +#define KPIOR_COLUMNOCONTRL_MASK 0x00FF +#define KPIOR_COLUMN_IO_DATA_SHIFT 0 + +#define KPEMR0_OFFSET0x0090 +#define KPEMR1_OFFSET0x0094 +#define KPEMR2_OFFSET0x0098 +#define KPEMR3_OFFSET0x009C +#define KPEMR_EDGETYPE_MAX 3 + +#define KPSSR0_OFFSET0x00A0 +#define KPSSR1_OFFSET0x00A4 +#define KPIMR0_OFFSET0x00B0 +#define KPIMR1_OFFSET0x00B4 +#define KPICR0_OFFSET0x00B8 +#define KPICR1_OFFSET0x00BC +#define KPISR0_OFFSET0x00C0 +#define KPISR1_OFFSET0x00C4 + +#define KPCR_STATUSFILTERTYPE_MAX 7 +#define KPCR_COLFILTERTYPE_MAX 7 + +/* Macros to determine the row/column from a bit that is s
[PATCH 1/2] Input: bcm-keypad: add device tree bindings
Documents the Broadcom keypad controller device tree bindings. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- .../devicetree/bindings/input/brcm,bcm-keypad.txt | 118 + 1 file changed, 118 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt diff --git a/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt new file mode 100644 index 000..645829d --- /dev/null +++ b/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt @@ -0,0 +1,118 @@ +* Broadcom Keypad Controller device tree bindings + +Broadcom Keypad controller is used to interface a SoC with a matrix-type +keypad device. The keypad controller supports multiple row and column lines. +A key can be placed at each intersection of a unique row and a unique column. +The keypad controller can sense a key-press and key-release and report the +event using a interrupt to the cpu. + +This binding is based on the matrix-keymap binding with the following +changes: + +keypad,num-rows and keypad,num-columns are required. + +Required SoC Specific Properties: +- compatible: should be "brcm,bcm-keypad" + +- reg: physical base address of the controller and length of memory mapped + region. + +- interrupts: The interrupt number to the cpu. + +Board Specific Properties: +- keypad,num-rows: Number of row lines connected to the keypad + controller. + +- keypad,num-columns: Number of column lines connected to the + keypad controller. + +- key-interrupt-trigger-type: The type of interrupt trigger asociated with the Keypad matrix. + + KEYPAD_INTERRUPT_NO_TRIGGER = 0 + KEYPAD_INTERRUPT_RISING_EDGE= 1 + KEYPAD_INTERRUPT_FALLING_EDGE = 2 + KEYPAD_INTERRUPT_BOTH_EDGES = 3 + +- col-debounce-filter-period: The debounce period for the Column filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- status-debounce-filter-period: The debounce period for the Status filter. + + KEYPAD_DEBOUNCE_1_ms= 0 + KEYPAD_DEBOUNCE_2_ms= 1 + KEYPAD_DEBOUNCE_4_ms= 2 + KEYPAD_DEBOUNCE_8_ms= 3 + KEYPAD_DEBOUNCE_16_ms = 4 + KEYPAD_DEBOUNCE_32_ms = 5 + KEYPAD_DEBOUNCE_64_ms = 6 + KEYPAD_DEBOUNCE_128_ms = 7 + +- row-output-enabled: An optional property indicating whether the row or + column is being used as output. If specified the row is being used + as the output. Else defaults to column. + +- pull-up-enabled: An optional property indicating the Keypad scan mode. + If specified implies the keypad scan pull-up has been enabled. + +- Keys represented as child nodes: Each key connected to the keypad + controller is represented as a child node to the keypad controller + device node and should include the following properties. + - row: the row number to which the key is connected. + - column: the column number to which the key is connected. + - code: the key-code to be reported when the key is pressed +and released. + +Example: +#include "dt-bindings/input/input.h" + +/ { + keypad: keypad@180ac000 { + /* Required SoC specific properties */ + compatible = "brcm,bcm-keypad"; + + /* Required Board specific properties */ + keypad,num-rows = <5>; + keypad,num-columns = <5>; + status = "okay"; + + linux,keymap = ; + + /* Optional board specific properties */ + key-interrupt-trigger-type = <3>; + col-debounce-filter-period = <5>; + row-output-enabled; + pull-up-enabled; + + }; +}; -- 2.2.2 -- 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/4] mmc: sdhci-iproc: add IPROC SDHCI driver
Add IPROC SDHCI driver for IPROC family of Broadcom devices. Acked-by: Ray Jui Signed-off-by: Corneliu Doban Signed-off-by: Scott Branden --- drivers/mmc/host/Kconfig | 14 +++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-iproc.c | 241 + 3 files changed, 256 insertions(+) create mode 100644 drivers/mmc/host/sdhci-iproc.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 2d6fbdd..d6a2ff1 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -292,6 +292,20 @@ config MMC_SDHCI_BCM2835 If unsure, say N. +config MMC_SDHCI_IPROC + tristate "SDHCI platform support for the iProc SD/MMC Controller" + depends on ARCH_BCM_IPROC || COMPILE_TEST + depends on MMC_SDHCI_PLTFM + default ARCH_BCM_IPROC + select MMC_SDHCI_IO_ACCESSORS + help + This selects the iProc SD/MMC controller. + + If you have an IPROC platform with SD or MMC devices, + say Y or M here. + + If unsure, say N. + config MMC_MOXART tristate "MOXART SD/MMC Host Controller support" depends on ARCH_MOXART && MMC diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index f7b0a77..32f24bd 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -70,6 +70,7 @@ obj-$(CONFIG_MMC_SDHCI_OF_ESDHC) += sdhci-of-esdhc.o obj-$(CONFIG_MMC_SDHCI_OF_HLWD)+= sdhci-of-hlwd.o obj-$(CONFIG_MMC_SDHCI_BCM_KONA) += sdhci-bcm-kona.o obj-$(CONFIG_MMC_SDHCI_BCM2835)+= sdhci-bcm2835.o +obj-$(CONFIG_MMC_SDHCI_IPROC) += sdhci-iproc.o obj-$(CONFIG_MMC_SDHCI_MSM)+= sdhci-msm.o obj-$(CONFIG_MMC_SDHCI_ST) += sdhci-st.o diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c new file mode 100644 index 000..4139d34 --- /dev/null +++ b/drivers/mmc/host/sdhci-iproc.c @@ -0,0 +1,241 @@ +/* + * Copyright (C) 2014 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * iProc SDHCI platform driver + */ + +#include +#include +#include +#include +#include +#include "sdhci-pltfm.h" + +struct sdhci_iproc_data { + const struct sdhci_pltfm_data *pdata; + u32 caps; + u32 caps1; +}; + +struct sdhci_iproc_host { + const struct sdhci_iproc_data *data; + u32 shadow_cmd; + u32 shadow_blk; +}; + +#define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18) + +static inline u32 sdhci_iproc_readl(struct sdhci_host *host, int reg) +{ + u32 val = readl(host->ioaddr + reg); + + pr_debug("%s: readl [0x%02x] 0x%08x\n", +mmc_hostname(host->mmc), reg, val); + return val; +} + +static u16 sdhci_iproc_readw(struct sdhci_host *host, int reg) +{ + u32 val = sdhci_iproc_readl(host, (reg & ~3)); + u16 word = val >> REG_OFFSET_IN_BITS(reg) & 0x; + return word; +} + +static u8 sdhci_iproc_readb(struct sdhci_host *host, int reg) +{ + u32 val = sdhci_iproc_readl(host, (reg & ~3)); + u8 byte = val >> REG_OFFSET_IN_BITS(reg) & 0xff; + return byte; +} + +static inline void sdhci_iproc_writel(struct sdhci_host *host, u32 val, int reg) +{ + pr_debug("%s: writel [0x%02x] 0x%08x\n", +mmc_hostname(host->mmc), reg, val); + + writel(val, host->ioaddr + reg); + + if (host->clock <= 40) { + /* Round up to micro-second four SD clock delay */ + if (host->clock) + udelay((4 * 100 + host->clock - 1) / host->clock); + else + udelay(10); + } +} + +/* + * The Arasan has a bugette whereby it may lose the content of successive + * writes to the same register that are within two SD-card clock cycles of + * each other (a clock domain crossing problem). The data + * register does not have this problem, which is just as well - otherwise we'd + * have to nobble the DMA engine too. + * + * This wouldn't be a problem with the code except that we can only write the + * controller with 32-bit writes. So two different 16-bit registers are + * written back to back creates the problem. + * + * In reality, this only happens when SDHCI_BLOCK_SIZE and SDHCI_BLOCK_COUNT + * are written followed by SDHCI_TRANSFER_MODE and SDHCI_COMMAND. + * The BLOCK_SIZE and BLOCK_COUNT are meaningless until a command issued
[PATCH 1/2] hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver
This adds a driver for random number generator present on Broadcom IPROC devices. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- drivers/char/hw_random/Kconfig| 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/iproc-rng200.c | 239 ++ 3 files changed, 253 insertions(+) create mode 100644 drivers/char/hw_random/iproc-rng200.c diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index de57b38..f48cf11 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -101,6 +101,19 @@ config HW_RANDOM_BCM2835 If unsure, say Y. +config HW_RANDOM_IPROC_RNG200 + tristate "Broadcom iProc RNG200 support" + depends on ARCH_BCM_IPROC + default HW_RANDOM + ---help--- + This driver provides kernel-side support for the RNG200 + hardware found on the Broadcom iProc SoCs. + + To compile this driver as a module, choose M here: the + module will be called iproc-rng200 + + If unsure, say Y. + config HW_RANDOM_GEODE tristate "AMD Geode HW Random Number Generator support" depends on X86_32 && PCI diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index 0b4cd57..055bb01 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile @@ -28,5 +28,6 @@ obj-$(CONFIG_HW_RANDOM_POWERNV) += powernv-rng.o obj-$(CONFIG_HW_RANDOM_EXYNOS) += exynos-rng.o obj-$(CONFIG_HW_RANDOM_TPM) += tpm-rng.o obj-$(CONFIG_HW_RANDOM_BCM2835) += bcm2835-rng.o +obj-$(CONFIG_HW_RANDOM_IPROC_RNG200) += iproc-rng200.o obj-$(CONFIG_HW_RANDOM_MSM) += msm-rng.o obj-$(CONFIG_HW_RANDOM_XGENE) += xgene-rng.o diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c new file mode 100644 index 000..0fef15d --- /dev/null +++ b/drivers/char/hw_random/iproc-rng200.c @@ -0,0 +1,239 @@ +/* +* Copyright (C) 2014 Broadcom Corporation +* +* 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 version 2. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ +/* + * DESCRIPTION: The Broadcom iProc RNG200 Driver + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Registers */ +#define RNG_CTRL_OFFSET0x00 +#define RNG_CTRL_RNG_RBGEN_MASK0x1FFF +#define RNG_CTRL_RNG_RBGEN_ENABLE 0x0001 +#define RNG_CTRL_RNG_RBGEN_DISABLE 0x + +#define RNG_SOFT_RESET_OFFSET 0x04 +#define RNG_SOFT_RESET_RNG_SOFT_RESET_MASK 0x0001 +#define RNG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE 0x0001 +#define RNG_SOFT_RESET_RNG_SOFT_RESET_CLEAR0x + +#define RBG_SOFT_RESET_OFFSET 0x08 +#define RBG_SOFT_RESET_RNG_SOFT_RESET_MASK 0x0001 +#define RBG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE 0x0001 +#define RBG_SOFT_RESET_RNG_SOFT_RESET_CLEAR0x + +#define RNG_INT_STATUS_OFFSET 0x18 +#define RNG_INT_STATUS_MASTER_FAIL_LOCKOUT_IRQ_MASK0x8000 +#define RNG_INT_STATUS_STARTUP_TRANSITIONS_MET_IRQ_MASK0x0002 +#define RNG_INT_STATUS_NIST_FAIL_IRQ_MASK 0x0020 +#define RNG_INT_STATUS_TOTAL_BITS_COUNT_IRQ_MASK 0x0001 + +#define RNG_FIFO_DATA_OFFSET 0x20 + +#define RNG_FIFO_COUNT_OFFSET 0x24 +#define RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK 0x00FF + +static void iproc_rng200_restart(void __iomem *rng_base) +{ + uint32_t val; + + /* Disable RBG */ + val = ioread32(rng_base + RNG_CTRL_OFFSET); + val &= ~RNG_CTRL_RNG_RBGEN_MASK; + val |= RNG_CTRL_RNG_RBGEN_DISABLE; + iowrite32(val, rng_base + RNG_CTRL_OFFSET); + + /* Clear all interrupt status */ + iowrite32(0xUL, rng_base + RNG_INT_STATUS_OFFSET); + + /* Reset RNG and RBG */ + val = ioread32(rng_base + RBG_SOFT_RESET_OFFSET); + val &= ~RBG_SOFT_RESET_RNG_SOFT_RESET_MASK; + val |= RBG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE; + iowrite32(val, rng_base + RBG_SOFT_RESET_OFFSET); + + val = ioread32(rng_base + RNG_SOFT_RESET_OFFSET); + val &= ~RNG_SOFT_RESET_RNG_SOFT_RESET_MASK; + val |= RNG_SOFT_RESET_RNG_SOFT_RESET_ACTIVE; + iowrite32(val, rng_base + RNG_SOFT_RESET_OFFSET); + + val = ioread32(rng_base + RNG_SOFT_RESET_OFFSET); + val &
[PATCH 2/2] hwrng: iproc-rng200 - Add device tree bindings
Documents the IPROC random number generator device tree bindings used in some Broadcom chipsets. Reviewed-by: Ray Jui Signed-off-by: Scott Branden --- .../devicetree/bindings/hwrng/brcm,iproc-rng200.txt | 12 1 file changed, 12 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt diff --git a/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt b/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt new file mode 100644 index 000..e25a456 --- /dev/null +++ b/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt @@ -0,0 +1,12 @@ +HWRNG support for the iproc-rng200 driver + +Required properties: +- compatible : "brcm,iproc-rng200" +- reg : base address and size of control register block + +Example: + +rng { +compatible = "brcm,iproc-rng200"; +reg = <0x18032000 0x28>; +}; -- 2.2.2 -- 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 1/2] Input: touchscreen-iproc: Add Broadcom iProc touchscreen driver
On 15-01-14 05:02 PM, Dmitry Torokhov wrote: Hi Jonathan, On Fri, Dec 19, 2014 at 02:17:49PM -0800, Jonathan Richardson wrote: + if (of_property_read_u32(np, "scanning_period", &val) >= 0) { + if (val < 1 || val > 256) { + dev_err(dev, "scanning_period must be [1-256]\n"); + return -EINVAL; + } + priv->cfg_params.scanning_period = val; + } + + if (of_property_read_u32(np, "debounce_timeout", &val) >= 0) { + if (val < 0 || val > 255) { + dev_err(dev, "debounce_timeout must be [0-255]\n"); + return -EINVAL; + } + priv->cfg_params.debounce_timeout = val; + } + + if (of_property_read_u32(np, "settling_timeout", &val) >= 0) { + if (val < 0 || val > 11) { + dev_err(dev, "settling_timeout must be [0-11]\n"); + return -EINVAL; + } + priv->cfg_params.settling_timeout = val; + } + + if (of_property_read_u32(np, "touch_timeout", &val) >= 0) { + if (val < 0 || val > 255) { + dev_err(dev, "touch_timeout must be [0-255]\n"); + return -EINVAL; + } + priv->cfg_params.touch_timeout = val; + } + + if (of_property_read_u32(np, "average_data", &val) >= 0) { + if (val < 0 || val > 8) { + dev_err(dev, "average_data must be [0-8]\n"); + return -EINVAL; + } + priv->cfg_params.average_data = val; + } + + if (of_property_read_u32(np, "fifo_threshold", &val) >= 0) { + if (val < 0 || val > 31) { + dev_err(dev, "fifo_threshold must be [0-31]\n"); + return -EINVAL; + } + priv->cfg_params.fifo_threshold = val; + } I think these are dveice specific and thus should have "brcm," prefix. I'm confused as to why we need the brcm prefix? Other device tree bindings we have for other drivers do not need such prefix. Is this convention documented somewhere? + + priv->ts_rotation = TS_ROTATION_0; + if (of_property_read_u32(np, "ts-rotation", &val) >= 0) { + priv->ts_rotation = val; + dev_dbg(dev, "ts rotation [%d] degrees\n", + 90 * priv->ts_rotation); + } This I am not quite sure about - if we want rotation or swap+invert. You are CCed on another email (tsc2007) that talks about need of generic touchscreen transforms in input core/of bindings. Does such generic binding exist today? If not, I would like to go with this implementation and update to the new binding if/when it exists? Thanks. -- 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 2/4] PCI: iproc: Add Broadcom iProc PCIe driver
On 14-12-10 03:31 AM, Arnd Bergmann wrote: On Tuesday 09 December 2014 16:04:29 Ray Jui wrote: Add initial version of the Broadcom iProc PCIe driver. This driver has been tested on NSP and Cygnus and is expected to work on all iProc family of SoCs that deploys the same PCIe host controller The driver also supports MSI Signed-off-by: Ray Jui Reviewed-by: Scott Branden The driver looks suspiciously like the one that Hauke already submitted a while ago for bcm53xx. Please come up with a merged driver that works for both. Could you please be a little more specific. What driver did "Hauke already submitted"? I do not see any driver in the kernel you are talking about. Are you sure that iProc isn't based on the BCMA bus infrastructure after all? Even the physical address of your PCI host falls into the address range that is used for the internal BCMA bus on the other chips! BCMA seems to be for MIPS architectures. It seems to be quite specific to those architectures using BCMA. I see no use of it in bcm53xx code? 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: [GIT PULL 3.19] Broadcom Cygnus SoC Device Tree changes
On 14-11-21 03:55 AM, Arnd Bergmann wrote: On Thursday 20 November 2014 12:55:35 Scott Branden wrote: On 14-11-20 03:54 AM, Arnd Bergmann wrote: On Wednesday 12 November 2014, Florian Fainelli wrote: The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1: Linux 3.18-rc1 (2014-10-19 18:08:38 -0700) are available in the git repository at: http://github.com/brcm/linux.git tags/arm-soc/for-3.19/cygnus-dts-v2 for you to fetch changes up to c9ad7bc5fe3c57c8c817fcb1bd264a02176a40c4: ARM: dts: Enable Broadcom Cygnus SoC (2014-11-11 22:30:42 -0800) This pull request contains the Broadcom Cygnus Device Tree changes: - binding documentation for the SoC and clock - cygnus SoC and clock dtsi files - DTS for Cygnus Entreprise phone, BCM911360K and BCM958300K Something went wrong here: This branch contains the updated license statements, but Olof had already merged the branch with the original license statements that we didn't like, so all three patches conflict with the ones we already have. Hi Arnd, It seems like the devicetree/bindings patch from this tag was not merged in to next/dt ? I definitely see them here, can you pull our tree again and have a second look? Do you see them in linux-next? I see them now. Sorry, must have been doing something wrong yesterday. 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: [GIT PULL 3.19] Broadcom Cygnus SoC Device Tree changes
On 14-11-20 03:54 AM, Arnd Bergmann wrote: On Wednesday 12 November 2014, Florian Fainelli wrote: The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1: Linux 3.18-rc1 (2014-10-19 18:08:38 -0700) are available in the git repository at: http://github.com/brcm/linux.git tags/arm-soc/for-3.19/cygnus-dts-v2 for you to fetch changes up to c9ad7bc5fe3c57c8c817fcb1bd264a02176a40c4: ARM: dts: Enable Broadcom Cygnus SoC (2014-11-11 22:30:42 -0800) This pull request contains the Broadcom Cygnus Device Tree changes: - binding documentation for the SoC and clock - cygnus SoC and clock dtsi files - DTS for Cygnus Entreprise phone, BCM911360K and BCM958300K Something went wrong here: This branch contains the updated license statements, but Olof had already merged the branch with the original license statements that we didn't like, so all three patches conflict with the ones we already have. Hi Arnd, It seems like the devicetree/bindings patch from this tag was not merged in to next/dt ? I've done an merge of the new branch over the old one, which was literally the first thing in the next/dt branch. This isn't ideal, but I think it's the best way out of the mess. I hope we can avoid this in the future. 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: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC
On 14-11-10 12:11 AM, Arnd Bergmann wrote: On Sunday 09 November 2014 21:17:37 Scott Branden wrote: On 14-11-09 12:38 PM, Arnd Bergmann wrote: On Sunday 09 November 2014 09:23:11 Greg Kroah-Hartman wrote: On Sat, Nov 08, 2014 at 10:49:09PM -0800, Olof Johansson wrote: +/* + * Copyright 2014 Broadcom Corporation. All rights reserved. + * + * Unless you and Broadcom execute a separate written software license + * agreement governing use of this software, this software is licensed to you + * under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can. This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes? I haven't followed the discussion close enough to know if there's been discussion about single-license BSD vs dual BSD/GPL. I think for all practical purposes, BSD and dual BSD/GPL is the same and listing it as dual was meant as a clarification to make it easier to see that all files in the kernel are GPLv2 compatible. A dual BSD/GPL may involve having me get a lawyer to create such a header. I would prefer to leave it as GPL for now until some concrete decision has finally been made on this by the rest of the community? Or, I can put it as BSD right now if that helps? I would prefer a pure BSD header for the moment over a pure GPL header. The last thing we want is to force other operating systems to create another set of dts files for the same hardware. I have changed the headers to pure BSD. I hope this is acceptable. 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: [GIT PULL] Broadcom Cygnus SoC defconfig changes
On 14-11-09 11:24 AM, Florian Fainelli wrote: On 11/08/14 21:45, Scott Branden wrote: Hi Olof, Thanks for the comments. Please see my questions inline before we determine what needs to be done for the defconfig patchset. On 14-11-08 04:13 PM, Olof Johansson wrote: On Thu, Oct 30, 2014 at 12:50:09PM -0700, Florian Fainelli wrote: The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1: Linux 3.18-rc1 (2014-10-19 18:08:38 -0700) are available in the git repository at: http://github.com/brcm/linux.git tags/arm-soc/for-3.18/cygnus-defconfig-v9 for you to fetch changes up to aa0204801143ee2d47e9e8dd5f39c5613b4b: ARM: multi_v7_defconfig: Enable Broadcom Cygnus (2014-10-30 11:01:35 -0700) Hi Florian, Apologies for the delay in dealing with this pull request. This patchset contains initial support for Broadcom's Cygnus SoC based on our iProc architecture. Initial support is minimal and includes just the mach platform code, clock driver, and a basic device tree configuration. Peripheral drivers will be submitted soon, as will device tree configurations for other Cygnus board variants. These are the defconfig parts of the changes Jonathan Richardson (1): ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC Ray Jui (1): ARM: multi_v7_defconfig: Enable Broadcom Cygnus Scott Branden (1): ARM: bcm_defconfig/multi_v7_defconfig: remove one level of menu from Kconfig arch/arm/configs/bcm_cygnus_defconfig | 237 ++ arch/arm/configs/bcm_defconfig| 3 +- arch/arm/configs/multi_v7_defconfig | 21 ++- Please send multi_v7_defconfig updates as a patch instead of including in a merge request. We ask for this because it's a file that many maintainers touch and it's easy that we get lots of conflicts otherwise. OK, easy to do. Are there other files that we need to be aware of that have these different requirements to merge as well? As far as the bcm_cygnus_defconfig: Since new platforms are multiplatform enabled by default, we normally only prefer to have one defconfig per vendor. We've made exceptions in cases where the families are very different, but in general one defconfig per vendor should be sufficient. I.e. please enable the cygnus options in bcm_defconfig instead of adding a new one. Hi Olof, we can do this. But this makes bcm_defconfig unusable for us in a product and is not a simple configuration to start from for our customers. bcm_defconfig is a different SoC family based around the Kona architecture. bcm_defconfig won't be what we build and test on Cygnus at all. There is a script in scripts/kconfig/mergeconfig.pl that allows you to merge config files together if you wish to have a kernel support multiple SoCs. I see the same problem with multi_v7_defconfig but even worse. It isn't a configuration we will ever use. Its only purpose seems to be to enable our drivers in the that build just in case somebody else happens to break something in the build. The defconfigs shipped in the mainline kernel only serve the purpose of building as many drivers/subsystems as possible and making sure they work well together from a general distribution perspective like Debian/Ubuntu/OE... That does not mean this is your configuration template for a downstream kernel with only a specific set of SoCs to support. As it stands, multi_v7_defconfig boots noticably slower than bcm_cygnus_defconfig. And, the kernel is larger than we want. And, the kconfigs are more complicated than we need for our boards. I also notice some of the other SoCs families enabled automatically turn on a lot of features we don't want on. Right, you are also very likely to see code blow away that has been enabled as part of the multi_v7_defconfig, but actually assumes that it will only run on a a particular family of SoCs, of course, all of this is good to fix to improve the multiplatform kernel, but does not necessarily impact you directly. Perhaps most of the multi_v7_defconfig merge issue you are facing could be solved if you used the mergconfig.pl script to merge multiple defconfigs together? What we wish to do is have a config file that only supports the Cygnus family of SoCs. This allows others to easily see what applies to Cygnus without being confused by other configurations. And, if somebody wishes to use scripts/kconfig/mergeconfig.pl to merge different SoC support together they are free to do so. So, we can do as you ask to get this upstreamed. But it really serves little purpose for us other than verifying things build. Where do we upstream the defconfig that we actually use? Or is this just not done and everyone keeps everything locally and has to continue to maintain it there? FWIW, this is typically what we
Re: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC
On 14-11-09 12:38 PM, Arnd Bergmann wrote: On Sunday 09 November 2014 09:23:11 Greg Kroah-Hartman wrote: On Sat, Nov 08, 2014 at 10:49:09PM -0800, Olof Johansson wrote: +/* + * Copyright 2014 Broadcom Corporation. All rights reserved. + * + * Unless you and Broadcom execute a separate written software license + * agreement governing use of this software, this software is licensed to you + * under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can. This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes? I haven't followed the discussion close enough to know if there's been discussion about single-license BSD vs dual BSD/GPL. I think for all practical purposes, BSD and dual BSD/GPL is the same and listing it as dual was meant as a clarification to make it easier to see that all files in the kernel are GPLv2 compatible. A dual BSD/GPL may involve having me get a lawyer to create such a header. I would prefer to leave it as GPL for now until some concrete decision has finally been made on this by the rest of the community? Or, I can put it as BSD right now if that helps? At the very least, please start the process of getting it changed. Also, I see now that this isn't even a clean GPL v2, given "Unless you and Broadcom..." language. I see the bnx2x driver had that in the past, but none of the Kona contributions did. I strongly suggest sticking to the normal copyrights here and not making things more complicated than they have to. I'm thinking that the "unless you and Broadcom..." language really doesn't mean much other than what all other files in the kernel mean from what I can tell. This should just default to GPLv2 and everyone should be ok. I would hope so at least. It's certainly not obvious whether that means Broadcom can give additional rights to someone over what someone else contributed upstream, or worse if this becomes GPL-incompatible and makes the kernel undistributable for anybody who has an additional license agreement that doesn't give them all the rights that they already had under the GPL. I'll change the header on these files so there are no disagreements. 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: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC
On 14-11-08 04:22 PM, Olof Johansson wrote: Hi, A bunch of small comments below, should be quick to fix. On Tue, Oct 28, 2014 at 12:53 PM, Scott Branden wrote: DT files to enable cygnus consisting on reference designs and cygnus core configuration. Reviewed-by: Ray Jui Reviewed-by: Arun Parameswaran Tested-by: Jonathan Richardson Reviewed-by: JD (Jiandong) Zheng Signed-off-by: Scott Branden --- arch/arm/boot/dts/Makefile |4 ++ arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 73 ++ arch/arm/boot/dts/bcm-cygnus.dtsi | 100 +++ arch/arm/boot/dts/bcm911360_entphn.dts | 32 ++ arch/arm/boot/dts/bcm911360k.dts| 32 ++ arch/arm/boot/dts/bcm958300k.dts| 32 ++ 6 files changed, 273 insertions(+) create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts create mode 100644 arch/arm/boot/dts/bcm911360k.dts create mode 100644 arch/arm/boot/dts/bcm958300k.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 38c89ca..4b3a590 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb +dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \ + bcm911360_entphn.dtb \ + bcm911360k.dtb \ + bcm958300k.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \ Please add new entries in alphabetical/alphanumerical order. Also, first entry is commonly added on the first line diff --git a/arch/arm/boot/dts/bcm-cygnus-clock.dtsi b/arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file mode 100644 index 000..d06172b --- /dev/null +++ b/arch/arm/boot/dts/bcm-cygnus-clock.dtsi @@ -0,0 +1,73 @@ +/* + * Copyright 2014 Broadcom Corporation. All rights reserved. + * + * Unless you and Broadcom execute a separate written software license + * agreement governing use of this software, this software is licensed to you + * under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can. This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes? + */ + +clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + osc: oscillator { + compatible = "fixed-clock"; + #clock-cells = <1>; + clock-frequency = <2500>; + }; + + apb_clk: apb_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <10>; + }; + + periph_clk: periph_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <5>; + }; + + sdio_clk: lcpll_ch2 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <2>; + }; + + axi81_clk: axi81_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <1>; + }; + + keypad_clk: keypad_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <31806>; + }; + + adc_clk: adc_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <1562500>; + }; + + pwm_clk: pwm_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100>; + }; + + lcd_clk: mipipll_ch1 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency
Re: [GIT PULL] Broadcom Cygnus SoC defconfig changes
Hi Olof, Thanks for the comments. Please see my questions inline before we determine what needs to be done for the defconfig patchset. On 14-11-08 04:13 PM, Olof Johansson wrote: On Thu, Oct 30, 2014 at 12:50:09PM -0700, Florian Fainelli wrote: The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1: Linux 3.18-rc1 (2014-10-19 18:08:38 -0700) are available in the git repository at: http://github.com/brcm/linux.git tags/arm-soc/for-3.18/cygnus-defconfig-v9 for you to fetch changes up to aa0204801143ee2d47e9e8dd5f39c5613b4b: ARM: multi_v7_defconfig: Enable Broadcom Cygnus (2014-10-30 11:01:35 -0700) Hi Florian, Apologies for the delay in dealing with this pull request. This patchset contains initial support for Broadcom's Cygnus SoC based on our iProc architecture. Initial support is minimal and includes just the mach platform code, clock driver, and a basic device tree configuration. Peripheral drivers will be submitted soon, as will device tree configurations for other Cygnus board variants. These are the defconfig parts of the changes Jonathan Richardson (1): ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC Ray Jui (1): ARM: multi_v7_defconfig: Enable Broadcom Cygnus Scott Branden (1): ARM: bcm_defconfig/multi_v7_defconfig: remove one level of menu from Kconfig arch/arm/configs/bcm_cygnus_defconfig | 237 ++ arch/arm/configs/bcm_defconfig| 3 +- arch/arm/configs/multi_v7_defconfig | 21 ++- Please send multi_v7_defconfig updates as a patch instead of including in a merge request. We ask for this because it's a file that many maintainers touch and it's easy that we get lots of conflicts otherwise. OK, easy to do. Are there other files that we need to be aware of that have these different requirements to merge as well? As far as the bcm_cygnus_defconfig: Since new platforms are multiplatform enabled by default, we normally only prefer to have one defconfig per vendor. We've made exceptions in cases where the families are very different, but in general one defconfig per vendor should be sufficient. I.e. please enable the cygnus options in bcm_defconfig instead of adding a new one. Hi Olof, we can do this. But this makes bcm_defconfig unusable for us in a product and is not a simple configuration to start from for our customers. bcm_defconfig is a different SoC family based around the Kona architecture. bcm_defconfig won't be what we build and test on Cygnus at all. There is a script in scripts/kconfig/mergeconfig.pl that allows you to merge config files together if you wish to have a kernel support multiple SoCs. I see the same problem with multi_v7_defconfig but even worse. It isn't a configuration we will ever use. Its only purpose seems to be to enable our drivers in the that build just in case somebody else happens to break something in the build. As it stands, multi_v7_defconfig boots noticably slower than bcm_cygnus_defconfig. And, the kernel is larger than we want. And, the kconfigs are more complicated than we need for our boards. I also notice some of the other SoCs families enabled automatically turn on a lot of features we don't want on. Perhaps most of the multi_v7_defconfig merge issue you are facing could be solved if you used the mergconfig.pl script to merge multiple defconfigs together? What we wish to do is have a config file that only supports the Cygnus family of SoCs. This allows others to easily see what applies to Cygnus without being confused by other configurations. And, if somebody wishes to use scripts/kconfig/mergeconfig.pl to merge different SoC support together they are free to do so. So, we can do as you ask to get this upstreamed. But it really serves little purpose for us other than verifying things build. Where do we upstream the defconfig that we actually use? Or is this just not done and everyone keeps everything locally and has to continue to maintain it there? -Olof -- 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 v9 7/8] ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig
remove menu "Broadcom Mobile SoC Selection" This requires: - selecting ARCH_BCM_MOBILE based on SoC selections - fixup bcm_defconfig and multi_v7_defconfig to work with new menu levels. Signed-off-by: Scott Branden --- arch/arm/configs/bcm_defconfig |3 ++- arch/arm/configs/multi_v7_defconfig |3 ++- arch/arm/mach-bcm/Kconfig | 26 ++ 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig index bc614f4..83a87e4 100644 --- a/arch/arm/configs/bcm_defconfig +++ b/arch/arm/configs/bcm_defconfig @@ -25,7 +25,8 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_PARTITION_ADVANCED=y CONFIG_ARCH_BCM=y -CONFIG_ARCH_BCM_MOBILE=y +CONFIG_ARCH_BCM_21664=y +CONFIG_ARCH_BCM_281XX=y CONFIG_ARM_THUMBEE=y CONFIG_SMP=y CONFIG_PREEMPT=y diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index f1dc7fc..6e0d7cb 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -17,7 +17,8 @@ CONFIG_MACH_ARMADA_38X=y CONFIG_MACH_ARMADA_XP=y CONFIG_MACH_DOVE=y CONFIG_ARCH_BCM=y -CONFIG_ARCH_BCM_MOBILE=y +CONFIG_ARCH_BCM_21664=y +CONFIG_ARCH_BCM_281XX=y CONFIG_ARCH_BCM_5301X=y CONFIG_ARCH_BRCMSTB=y CONFIG_ARCH_BERLIN=y diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 6e79696..cceb69f 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -51,8 +51,10 @@ config ARCH_BCM_5301X different SoC or with the older BCM47XX and BCM53XX based network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx +comment "KONA architected SoCs" + config ARCH_BCM_MOBILE - bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7 + bool select ARCH_REQUIRE_GPIOLIB select ARM_ERRATA_754322 select ARM_ERRATA_775420 @@ -61,16 +63,13 @@ config ARCH_BCM_MOBILE select TICK_ONESHOT select HAVE_ARM_ARCH_TIMER select PINCTRL + select ARCH_BCM_MOBILE_SMP if SMP help This enables support for systems based on Broadcom mobile SoCs. -if ARCH_BCM_MOBILE - -menu "Broadcom Mobile SoC Selection" - config ARCH_BCM_281XX bool "Broadcom BCM281XX SoC family" - default y + select ARCH_BCM_MOBILE select HAVE_SMP help Enable support for the BCM281XX family, which includes @@ -79,7 +78,7 @@ config ARCH_BCM_281XX config ARCH_BCM_21664 bool "Broadcom BCM21664 SoC family" - default y + select ARCH_BCM_MOBILE select HAVE_SMP help Enable support for the BCM21664 family, which includes @@ -87,19 +86,18 @@ config ARCH_BCM_21664 config ARCH_BCM_MOBILE_L2_CACHE bool "Broadcom mobile SoC level 2 cache support" - depends on (ARCH_BCM_281XX || ARCH_BCM_21664) + depends on ARCH_BCM_MOBILE default y select CACHE_L2X0 select ARCH_BCM_MOBILE_SMC config ARCH_BCM_MOBILE_SMC bool - depends on ARCH_BCM_281XX || ARCH_BCM_21664 + depends on ARCH_BCM_MOBILE config ARCH_BCM_MOBILE_SMP - bool "Broadcom mobile SoC SMP support" - depends on (ARCH_BCM_281XX || ARCH_BCM_21664) && SMP - default y + bool + depends on ARCH_BCM_MOBILE select HAVE_ARM_SCU select ARM_ERRATA_764369 help @@ -107,10 +105,6 @@ config ARCH_BCM_MOBILE_SMP Provided as an option so SMP support for SoCs of this type can be disabled for an SMP-enabled kernel. -endmenu - -endif - comment "Other Architectures" config ARCH_BCM2835 -- 1.7.9.5 -- 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 v9 6/8] ARM: mach-bcm: Consolidate currently supported IPROC SoCs
Move ARCH_BCM_5301X subarch under ARCH_IPROC architecture. Additional IPROC chipsets that share a lot of commonality should be added under ARCH_IPROC as well. Signed-off-by: Scott Branden --- arch/arm/mach-bcm/Kconfig | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 73d95c2..6e79696 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -35,6 +35,22 @@ config ARCH_BCM_CYGNUS BCM11300, BCM11320, BCM11350, BCM11360, BCM58300, BCM58302, BCM58303, BCM58305. +config ARCH_BCM_5301X + bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7 + select ARCH_BCM_IPROC + help + Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores. + + This is a network SoC line mostly used in home routers and + wifi access points, it's internal name is Northstar. + This inclused the following SoC: BCM53010, BCM53011, BCM53012, + BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707, + BCM4708 and BCM4709. + + Do not confuse this with the BCM4760 which is a totally + different SoC or with the older BCM47XX and BCM53XX based + network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx + config ARCH_BCM_MOBILE bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7 select ARCH_REQUIRE_GPIOLIB @@ -110,27 +126,6 @@ config ARCH_BCM2835 This enables support for the Broadcom BCM2835 SoC. This SoC is used in the Raspberry Pi and Roku 2 devices. -config ARCH_BCM_5301X - bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7 - select ARM_GIC - select CACHE_L2X0 - select HAVE_ARM_SCU if SMP - select HAVE_ARM_TWD if SMP - select ARM_GLOBAL_TIMER - select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK - help - Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores. - - This is a network SoC line mostly used in home routers and - wifi access points, it's internal name is Northstar. - This inclused the following SoC: BCM53010, BCM53011, BCM53012, - BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707, - BCM4708 and BCM4709. - - Do not confuse this with the BCM4760 which is a totally - different SoC or with the older BCM47XX and BCM53XX based - network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx - config ARCH_BCM_63XX bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7 depends on MMU -- 1.7.9.5 -- 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