Introduce GENI SE Controller Driver
Subsystems (6)
v6 cover Introduce GENI SE Controller Driver
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
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v6 1/5 dt-bindings: soc: qcom: Add device tree binding for GENI SE
Add device tree binding support for the QCOM GENI SE driver.
--- .../devicetree/bindings/soc/qcom/qcom,geni-se.txt | 119 +++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt new file +119 -0
@@ -0,0 +1,119 @@ +Qualcomm Technologies, Inc. GENI Serial Engine QUP Wrapper Controller + +Generic Interface (GENI) based Qualcomm Universal Peripheral (QUP) wrapper +is a 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. The GENI Serial Engine QUP +Wrapper controller is modeled as a node with zero or more child nodes each +representing a serial engine. + +Required properties: +- compatible: Must be "qcom,geni-se-qup". +- reg: Must contain QUP register address and length. +- clock-names: Must contain "m-ahb" and "s-ahb". +- clocks: AHB clocks needed by the device. + +Required properties if child node exists: +- #address-cells: Must be <1> for Serial Engine Address +- #size-cells: Must be <1> for Serial Engine Address Size +- ranges: Must be present + +Properties for children: + +A GENI based QUP wrapper controller node can contain 0 or more child nodes +representing serial devices. These serial devices can be a QCOM UART, I2C +controller, SPI controller, or some combination of aforementioned devices. +Please refer below the child node definitions for the supported serial +interface protocols. + +Qualcomm Technologies Inc. GENI Serial Engine based I2C Controller + +Required properties: +- compatible: Must be "qcom,geni-i2c". +- reg: Must contain QUP register address and length. +- interrupts: Must contain I2C interrupt. +- clock-names: Must contain "se". +- clocks: Serial engine core clock needed by the device. +- #address-cells: Must be <1> for I2C device address. +- #size-cells: Must be <0> as I2C addresses have no size component. + +Optional property: +- clock-frequency: Desired I2C bus clock frequency in Hz. + When missing default to 400000Hz. + +Child nodes should conform to I2C bus binding as described in i2c.txt. + +Qualcomm Technologies Inc. GENI Serial Engine based UART Controller + +Required properties: +- compatible: Must be "qcom,geni-debug-uart". +- reg: Must contain UART register location and length. +- interrupts: Must contain UART core interrupts. +- clock-names: Must contain "se". +- clocks: Serial engine core clock needed by the device. + +Qualcomm Technologies Inc. GENI Serial Engine based SPI Controller + +Required properties: +- compatible: Must contain "qcom,geni-spi". +- reg: Must contain SPI register location and length. +- interrupts: Must contain SPI controller interrupts. +- clock-names: Must contain "se". +- clocks: Serial engine core clock needed by the device. +- spi-max-frequency: Specifies maximum SPI clock frequency, units - Hz. +- #address-cells: Must be <1> to define a chip select address on + the SPI bus. +- #size-cells: Must be <0>. + +SPI slave nodes must be children of the SPI master node and conform to SPI bus +binding as described in Documentation/devicetree/bindings/spi/spi-bus.txt. + +Example: + geniqup@8c0000 { + compatible = "qcom,geni-se-qup"; + reg = <0x8c0000 0x6000>; + clock-names = "m-ahb", "s-ahb"; + clocks = <&clock_gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>, + <&clock_gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + i2c0: i2c@a94000 { + compatible = "qcom,geni-i2c"; + reg = <0xa94000 0x4000>; + interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "se"; + clocks = <&clock_gcc GCC_QUPV3_WRAP0_S5_CLK>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&qup_1_i2c_5_active>; + pinctrl-1 = <&qup_1_i2c_5_sleep>; + #address-cells = <1>; + #size-cells = <0>; + }; + + uart0: serial@a88000 { + compatible = "qcom,geni-debug-uart"; + reg = <0xa88000 0x7000>; + interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "se"; + clocks = <&clock_gcc GCC_QUPV3_WRAP0_S0_CLK>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&qup_1_uart_3_active>; + pinctrl-1 = <&qup_1_uart_3_sleep>; + }; + + spi0: spi@a84000 { + compatible = "qcom,geni-spi"; + reg = <0xa84000 0x4000>; + interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "se"; + clocks = <&clock_gcc GCC_QUPV3_WRAP0_S0_CLK>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&qup_1_spi_2_active>; + pinctrl-1 = <&qup_1_spi_2_sleep>; + spi-max-frequency = <19200000>; + #address-cells = <1>; + #size-cells = <0>; + }; + }
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v6 2/5 soc: qcom: Add GENI based QUP Wrapper driver
In reply to Karthikeyan RamasubramanianThis 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.
--- 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
drivers/soc/qcom/Kconfig +9 -0
@@ -3,6 +3,15 @@ # menu "Qualcomm SoC drivers" +config QCOM_GENI_SE + tristate "QCOM GENI Serial Engine Driver" + depends on ARCH_QCOM || COMPILE_TEST + help + This driver is used to manage Generic Interface (GENI) firmware based + Qualcomm Technologies, Inc. Universal Peripheral (QUP) Wrapper. This + driver is also used to manage the common aspects of multiple Serial + Engines present in the QUP. + config QCOM_GLINK_SSR tristate "Qualcomm Glink SSR driver" depends on RPMSG
drivers/soc/qcom/Makefile +1 -0
@@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_QCOM_GENI_SE) += qcom-geni-se.o obj-$(CONFIG_QCOM_GLINK_SSR) += glink_ssr.o obj-$(CONFIG_QCOM_GSBI) += qcom_gsbi.o obj-$(CONFIG_QCOM_MDT_LOADER) += mdt_loader.o
drivers/soc/qcom/qcom-geni-se.c new file +748 -0
748 lines not on this page · raw message
include/linux/qcom-geni-se.h new file +425 -0
425 lines not on this page · raw message
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v6 3/5 i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller
In reply to Karthikeyan RamasubramanianThis bus driver supports the GENI based i2c hardware controller in the Qualcomm SOCs. The Qualcomm Generic Interface (GENI) is a programmable module supporting a wide range of serial interfaces including I2C. The driver supports FIFO mode and DMA mode of transfer and switches modes dynamically depending on the size of the transfer.
--- drivers/i2c/busses/Kconfig | 13 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-qcom-geni.c | 649 +++++++++++++++++++++++++++++++++++++ 3 files changed, 663 insertions(+) create mode 100644 drivers/i2c/busses/i2c-qcom-geni.c
drivers/i2c/busses/Kconfig +13 -0
@@ -848,6 +848,19 @@ config I2C_PXA_SLAVE is necessary for systems where the PXA may be a target on the I2C bus. +config I2C_QCOM_GENI + tristate "Qualcomm Technologies Inc.'s GENI based I2C controller" + depends on ARCH_QCOM || COMPILE_TEST + depends on QCOM_GENI_SE + help + This driver supports GENI serial engine based I2C controller in + master mode on the Qualcomm Technologies Inc.'s SoCs. If you say + yes to this option, support will be included for the built-in I2C + interface on the Qualcomm Technologies Inc.'s SoCs. + + This driver can also be built as a module. If so, the module + will be called i2c-qcom-geni. + config I2C_QUP tristate "Qualcomm QUP based I2C controller" depends on ARCH_QCOM
drivers/i2c/busses/Makefile +1 -0
@@ -84,6 +84,7 @@ obj-$(CONFIG_I2C_PNX) += i2c-pnx.o obj-$(CONFIG_I2C_PUV3) += i2c-puv3.o obj-$(CONFIG_I2C_PXA) += i2c-pxa.o obj-$(CONFIG_I2C_PXA_PCI) += i2c-pxa-pci.o +obj-$(CONFIG_I2C_QCOM_GENI) += i2c-qcom-geni.o obj-$(CONFIG_I2C_QUP) += i2c-qup.o obj-$(CONFIG_I2C_RIIC) += i2c-riic.o obj-$(CONFIG_I2C_RK3X) += i2c-rk3x.o
drivers/i2c/busses/i2c-qcom-geni.c new file +649 -0
649 lines not on this page · raw message
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v6 4/5 arm64: dts: sdm845: Add serial console support
In reply to Karthikeyan RamasubramanianFrom: Rajendra Nayak <[email protected]>
Add the qup uart node and geni se instance needed to support the serial console on the MTP.
--- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 41 +++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 39 +++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-mtp.dts +41 -0
@@ -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; + }; + }; + }; };
arch/arm64/boot/dts/qcom/sdm845.dtsi +39 -0
@@ -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"; + }; + }; }; };
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v6 5/5 arm64: dts: sdm845: Add support for an instance of I2C controller
In reply to Karthikeyan RamasubramanianAdd one instance of GENI based I2C master controller to enable testing I2C driver using EEPROM slave.
--- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 19 +++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 28 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-mtp.dts +19 -0
@@ -29,9 +29,28 @@ serial@a84000 { status = "okay"; }; + + i2c@a88000 { + clock-frequency = <400000>; + status = "okay"; + }; }; pinctrl@3400000 { + qup-i2c10-default { + pinconf { + pins = "gpio55", "gpio56"; + drive-strength = <2>; + bias-disable; + }; + }; + + qup-i2c10-sleep { + pinconf { + pins = "gpio55", "gpio56"; + }; + }; + qup-uart2-default { pinconf_tx { pins = "gpio4";
arch/arm64/boot/dts/qcom/sdm845.dtsi +28 -0
@@ -196,6 +196,20 @@ interrupt-controller; #interrupt-cells = <2>; + qup_i2c10_default: qup-i2c10-default { + pinmux { + function = "qup10"; + pins = "gpio55", "gpio56"; + }; + }; + + qup_i2c10_sleep: qup-i2c10-sleep { + pinmux { + function = "gpio"; + pins = "gpio55", "gpio56"; + }; + }; + qup_uart2_default: qup-uart2-default { pinmux { function = "qup9";
@@ -310,6 +324,20 @@ interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; }; + + i2c10: i2c@a88000 { + compatible = "qcom,geni-i2c"; + reg = <0xa88000 0x4000>; + clock-names = "se"; + clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&qup_i2c10_default>; + pinctrl-1 = <&qup_i2c10_sleep>; + interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; }; }; };
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v6 2/5] soc: qcom: Add GENI based QUP Wrapper driver
In reply to Karthikeyan RamasubramanianQuoted 7 lines · Karthikeyan Ramasubramanian
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.
Quoted 7 lines
Signed-off-by Karthikeyan Ramasubramanian <[email protected]>Signed-off-by Sagar Dharia <[email protected]>Signed-off-by Girish Mahadevan <[email protected]>--- drivers/soc/qcom/Kconfig | 9 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/qcom-geni-se.c | 748
++++++++++++++++++++++++++++++++++++++++
Quoted 4 lines
include/linux/qcom-geni-se.h | 425 +++++++++++++++++++++++ 4 files changed, 1183 insertions(+)create mode 100644
drivers/soc/qcom/qcom-geni-se.ccreate mode 100644include/linux/qcom-geni-se.h
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.
Quoted 89 lines · Karthikeyan Ramasubramanian
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
* Fixpoll_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 HerringKarthikeyan 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 controllerRajendra 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
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v6 4/5] arm64: dts: sdm845: Add serial console support
In reply to Karthikeyan RamasubramanianQuoted 8 lines · Karthikeyan Ramasubramanian
From: Rajendra Nayak <[email protected]>
Add the qup uart node and geni se instance needed to support the serial console on the MTP.
Signed-off-by Rajendra Nayak <[email protected]>Signed-off-by Karthikeyan Ramasubramanian <[email protected]>---
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
Quoted 118 lines
arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 41 +++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 39 +++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+)arch/arm64/boot/dts/qcom/sdm845-mtp.dts +41
-0@@ -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; + }; + }; + }; };arch/arm64/boot/dts/qcom/sdm845.dtsi +39
-0@@ -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"; + }; + }; }; };
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH v6 4/5] arm64: dts: sdm845: Add serial console support
Rajendra,
Quoted 12 lines · Rajendra Nayak
Quoted 8 lines · Karthikeyan Ramasubramanian
From: Rajendra Nayak <[email protected]>
Add the qup uart node and geni se instance needed to support the serial console on the MTP.
Signed-off-by Rajendra Nayak <[email protected]>Signed-off-by Karthikeyan Ramasubramanian <[email protected]>---
Quoted 5 lines
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
Re: [PATCH v6 4/5] arm64: dts: sdm845: Add serial console support
Quoted 18 lines · Doug Anderson
Rajendra,
Quoted 15 lines · Rajendra Nayak
Quoted 8 lines · Karthikeyan Ramasubramanian
From: Rajendra Nayak <[email protected]>
Add the qup uart node and geni se instance needed to support the serial console on the MTP.
Signed-off-by Rajendra Nayak <[email protected]>Signed-off-by Karthikeyan Ramasubramanian <[email protected]>---
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.
Quoted 7 lines
Quoted 2 lines
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.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation