Message ID | 1522429700-13083-1-git-send-email-kramasub@codeaurora.org |
---|---|
Headers | show |
Series | Introduce GENI SE Controller Driver | expand |
On Fri, Mar 30, 2018 at 10:08 AM Karthikeyan Ramasubramanian < kramasub@codeaurora.org> wrote: > This driver manages the Generic Interface (GENI) firmware based Qualcomm > Universal Peripheral (QUP) Wrapper. GENI based QUP is the next generation > programmable module composed of multiple Serial Engines (SE) and supports > a wide range of serial interfaces like UART, SPI, I2C, I3C, etc. This > driver also enables managing the serial interface independent aspects of > Serial Engines. > Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org> > Signed-off-by: Sagar Dharia <sdharia@codeaurora.org> > Signed-off-by: Girish Mahadevan <girishm@codeaurora.org> > --- > drivers/soc/qcom/Kconfig | 9 + > drivers/soc/qcom/Makefile | 1 + > drivers/soc/qcom/qcom-geni-se.c | 748 ++++++++++++++++++++++++++++++++++++++++ > include/linux/qcom-geni-se.h | 425 +++++++++++++++++++++++ > 4 files changed, 1183 insertions(+) > create mode 100644 drivers/soc/qcom/qcom-geni-se.c > create mode 100644 include/linux/qcom-geni-se.h Reviewed-by: Evan Green <evgreen@chromium.org> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Maintainers, Sorry if I am stepping in too soon. Since all the patches in this series have been reviewed and remaining silent for some time, would you please mind pulling in these patches as part of your next pull request. Thanks and Regards, Karthik. On 3/30/2018 11:08 AM, Karthikeyan Ramasubramanian wrote: > Generic Interface (GENI) firmware based Qualcomm Universal Peripheral (QUP) > Wrapper is a next generation programmable module for supporting a wide > range of serial interfaces like UART, SPI, I2C, I3C, etc. A single QUP > module can provide upto 8 Serial Interfaces using its internal Serial > Engines (SE). The protocol supported by each interface is determined by > the firmware loaded to the Serial Engine. > > This patch series introduces GENI SE Driver to manage the GENI based QUP > Wrapper and the common aspects of all SEs inside the QUP Wrapper. This > patch series also introduces the UART and I2C Controller drivers to > drive the SEs that are programmed with the respective protocols. > > [v6] > * Move the I2C clock-frequency configuration to the SDM845 board file > * Remove a redundant comment in the I2C driver > > [v5] > * Remove Linux specific property from the device tree binding > * Clarify I2C SCL time period documentation > * Remove redundant checks in I2C controller driver during timeout > * Use 100kHz as the default clock frequency in the I2C controller driver > * Disable Wrapper controller by default in the SDM845 device tree and > enable it explicitly for SDM845 MTP > * Specify I2C clock frequency in the SDM845 device tree > * Remove bias configuration for I2C pins under sleep state in device tree > * Drop the serial driver from the patch series since it is merged > * Specify the UART port options in the SDM845 device tree > > [v4] > * Add SPI controller information in device tree binding > * Add support for debug UART & I2C controllers in SDM845 device tree > * Remove any unnecessary parenthesis & casting > * Identify break character in UART line and pass it to the framework > * Transmit data from fault handler reliably in debug UART > * Map the register block when the UART port is requested > * Move concise exported functions as macros or inlines in public header > * Move the clock performance table from the wrapper to serial engines > * Add a lock to synchronize between IRQ & error handling in I2C controller > * Remove any compiler optimization hints like likely/unlikely > * Update documentation to clarify tables and hardware blocks > > [v3] > * Update the driver dependencies > * Use the SPDX License Expression > * Squash all the controller device tree bindings together > * Use kernel doc format for documentation > * Add additional documentation for packing configuration > * Use clk_bulk_* API for related clocks > * Remove driver references to pinctrl and their states > * Replace magic numbers with appropriate macros > * Update memory barrier usage and associated comments > * Reduce interlacing of register reads/writes > * Fix poll_get_char() operation in console UART driver under polling mode > * Address other comments from Bjorn Andersson to improve code readability > > [v2] > * Updated device tree bindings to describe the hardware > * Updated SE DT node as child node of QUP Wrapper DT node > * Moved common AHB clocks to QUP Wrapper DT node > * Use the standard "clock-frequency" I2C property > * Update compatible field in UART Controller to reflect hardware manual > * Addressed other device tree binding specific comments from Rob Herring > > Karthikeyan Ramasubramanian (4): > dt-bindings: soc: qcom: Add device tree binding for GENI SE > soc: qcom: Add GENI based QUP Wrapper driver > i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C > controller > arm64: dts: sdm845: Add support for an instance of I2C controller > > Rajendra Nayak (1): > arm64: dts: sdm845: Add serial console support > > .../devicetree/bindings/soc/qcom/qcom,geni-se.txt | 119 ++++ > arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 60 ++ > arch/arm64/boot/dts/qcom/sdm845.dtsi | 67 ++ > drivers/i2c/busses/Kconfig | 13 + > drivers/i2c/busses/Makefile | 1 + > drivers/i2c/busses/i2c-qcom-geni.c | 649 ++++++++++++++++++ > drivers/soc/qcom/Kconfig | 9 + > drivers/soc/qcom/Makefile | 1 + > drivers/soc/qcom/qcom-geni-se.c | 748 +++++++++++++++++++++ > include/linux/qcom-geni-se.h | 425 ++++++++++++ > 10 files changed, 2092 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt > create mode 100644 drivers/i2c/busses/i2c-qcom-geni.c > create mode 100644 drivers/soc/qcom/qcom-geni-se.c > create mode 100644 include/linux/qcom-geni-se.h >
On 03/30/2018 10:38 PM, Karthikeyan Ramasubramanian wrote: > From: Rajendra Nayak <rnayak@codeaurora.org> > > Add the qup uart node and geni se instance needed to > support the serial console on the MTP. > > Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> > Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org> > --- Andy, is it possible to pull this one in for 4.18? Sorry, I only realized we somehow missed this after looking at your pull request. This is the only patch that prevents linux-next from booting up my sdm845 MTP to a minimal console shell. Thanks, Rajendra > arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 41 +++++++++++++++++++++++++++++++++ > arch/arm64/boot/dts/qcom/sdm845.dtsi | 39 +++++++++++++++++++++++++++++++ > 2 files changed, 80 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts > index 979ab49..17b2fb0 100644 > --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts > +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts > @@ -12,4 +12,45 @@ > / { > model = "Qualcomm Technologies, Inc. SDM845 MTP"; > compatible = "qcom,sdm845-mtp"; > + > + aliases { > + serial0 = &uart2; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > +}; > + > +&soc { > + geniqup@ac0000 { > + status = "okay"; > + > + serial@a84000 { > + status = "okay"; > + }; > + }; > + > + pinctrl@3400000 { > + qup-uart2-default { > + pinconf_tx { > + pins = "gpio4"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + pinconf_rx { > + pins = "gpio5"; > + drive-strength = <2>; > + bias-pull-up; > + }; > + }; > + > + qup-uart2-sleep { > + pinconf { > + pins = "gpio4", "gpio5"; > + bias-pull-down; > + }; > + }; > + }; > }; > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi > index 32f8561..71801b9 100644 > --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi > +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi > @@ -6,6 +6,7 @@ > */ > > #include <dt-bindings/interrupt-controller/arm-gic.h> > +#include <dt-bindings/clock/qcom,gcc-sdm845.h> > > / { > interrupt-parent = <&intc>; > @@ -194,6 +195,20 @@ > #gpio-cells = <2>; > interrupt-controller; > #interrupt-cells = <2>; > + > + qup_uart2_default: qup-uart2-default { > + pinmux { > + function = "qup9"; > + pins = "gpio4", "gpio5"; > + }; > + }; > + > + qup_uart2_sleep: qup-uart2-sleep { > + pinmux { > + function = "gpio"; > + pins = "gpio4", "gpio5"; > + }; > + }; > }; > > timer@17c90000 { > @@ -272,5 +287,29 @@ > #interrupt-cells = <4>; > cell-index = <0>; > }; > + > + geniqup@ac0000 { > + compatible = "qcom,geni-se-qup"; > + reg = <0xac0000 0x6000>; > + clock-names = "m-ahb", "s-ahb"; > + clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>, > + <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; > + status = "disabled"; > + > + uart2: serial@a84000 { > + compatible = "qcom,geni-debug-uart"; > + reg = <0xa84000 0x4000>; > + clock-names = "se"; > + clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>; > + pinctrl-names = "default", "sleep"; > + pinctrl-0 = <&qup_uart2_default>; > + pinctrl-1 = <&qup_uart2_sleep>; > + interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>; > + status = "disabled"; > + }; > + }; > }; > }; >
Rajendra, On Tue, May 22, 2018 at 11:30 PM, Rajendra Nayak <rnayak@codeaurora.org> wrote: > > > On 03/30/2018 10:38 PM, Karthikeyan Ramasubramanian wrote: >> From: Rajendra Nayak <rnayak@codeaurora.org> >> >> Add the qup uart node and geni se instance needed to >> support the serial console on the MTP. >> >> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> >> Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org> >> --- > > Andy, is it possible to pull this one in for 4.18? > Sorry, I only realized we somehow missed this after looking at your pull request. > > This is the only patch that prevents linux-next from booting up my sdm845 MTP > to a minimal console shell. It was in Andy's tree but then got dropped. Unfortunately the clock bindings didn't land early enough so it's a bit difficult to land any device tree changes that use the clock bindings until the next kernel revision... -Doug -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 05/23/2018 08:43 PM, Doug Anderson wrote: > Rajendra, > > On Tue, May 22, 2018 at 11:30 PM, Rajendra Nayak <rnayak@codeaurora.org> wrote: >> >> >> On 03/30/2018 10:38 PM, Karthikeyan Ramasubramanian wrote: >>> From: Rajendra Nayak <rnayak@codeaurora.org> >>> >>> Add the qup uart node and geni se instance needed to >>> support the serial console on the MTP. >>> >>> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> >>> Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org> >>> --- >> >> Andy, is it possible to pull this one in for 4.18? >> Sorry, I only realized we somehow missed this after looking at your pull request. >> >> This is the only patch that prevents linux-next from booting up my sdm845 MTP >> to a minimal console shell. > > It was in Andy's tree but then got dropped. Unfortunately the clock > bindings didn't land early enough so it's a bit difficult to land any > device tree changes that use the clock bindings until the next kernel > revision... ah, okay, did not realize that. Thanks for clarifying.