18c2ecf20Sopenharmony_ciQCOM GSBI (General Serial Bus Interface) Driver
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe GSBI controller is modeled as a node with zero or more child nodes, each
48c2ecf20Sopenharmony_cirepresenting a serial sub-node device that is mux'd as part of the GSBI
58c2ecf20Sopenharmony_ciconfiguration settings.  The mode setting will govern the input/output mode of
68c2ecf20Sopenharmony_cithe 4 GSBI IOs.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciRequired properties:
98c2ecf20Sopenharmony_ci- compatible:	Should contain "qcom,gsbi-v1.0.0"
108c2ecf20Sopenharmony_ci- cell-index:	Should contain the GSBI index
118c2ecf20Sopenharmony_ci- reg: Address range for GSBI registers
128c2ecf20Sopenharmony_ci- clocks: required clock
138c2ecf20Sopenharmony_ci- clock-names: must contain "iface" entry
148c2ecf20Sopenharmony_ci- qcom,mode : indicates MUX value for configuration of the serial interface.
158c2ecf20Sopenharmony_ci  Please reference dt-bindings/soc/qcom,gsbi.h for valid mux values.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciOptional properties:
188c2ecf20Sopenharmony_ci- qcom,crci : indicates CRCI MUX value for QUP CRCI ports.  Please reference
198c2ecf20Sopenharmony_ci  dt-bindings/soc/qcom,gsbi.h for valid CRCI mux values.
208c2ecf20Sopenharmony_ci- syscon-tcsr: indicates phandle of TCSR syscon node.  Required if child uses
218c2ecf20Sopenharmony_ci  dma.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciRequired properties if child node exists:
248c2ecf20Sopenharmony_ci- #address-cells: Must be 1
258c2ecf20Sopenharmony_ci- #size-cells: Must be 1
268c2ecf20Sopenharmony_ci- ranges: Must be present
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciProperties for children:
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciA GSBI controller node can contain 0 or more child nodes representing serial
318c2ecf20Sopenharmony_cidevices.  These serial devices can be a QCOM UART, I2C controller, spi
328c2ecf20Sopenharmony_cicontroller, or some combination of aforementioned devices.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciSee the following for child node definitions:
358c2ecf20Sopenharmony_ciDocumentation/devicetree/bindings/i2c/qcom,i2c-qup.txt
368c2ecf20Sopenharmony_ciDocumentation/devicetree/bindings/spi/qcom,spi-qup.txt
378c2ecf20Sopenharmony_ciDocumentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ciExample for APQ8064:
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci#include <dt-bindings/soc/qcom,gsbi.h>
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci	gsbi4@16300000 {
448c2ecf20Sopenharmony_ci		compatible = "qcom,gsbi-v1.0.0";
458c2ecf20Sopenharmony_ci		cell-index = <4>;
468c2ecf20Sopenharmony_ci		reg = <0x16300000 0x100>;
478c2ecf20Sopenharmony_ci		clocks = <&gcc GSBI4_H_CLK>;
488c2ecf20Sopenharmony_ci		clock-names = "iface";
498c2ecf20Sopenharmony_ci		#address-cells = <1>;
508c2ecf20Sopenharmony_ci		#size-cells = <1>;
518c2ecf20Sopenharmony_ci		ranges;
528c2ecf20Sopenharmony_ci		qcom,mode = <GSBI_PROT_I2C_UART>;
538c2ecf20Sopenharmony_ci		qcom,crci = <GSBI_CRCI_QUP>;
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci		syscon-tcsr = <&tcsr>;
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci		/* child nodes go under here */
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci		i2c_qup4: i2c@16380000 {
608c2ecf20Sopenharmony_ci			compatible = "qcom,i2c-qup-v1.1.1";
618c2ecf20Sopenharmony_ci			reg = <0x16380000 0x1000>;
628c2ecf20Sopenharmony_ci			interrupts = <0 153 0>;
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci			clocks = <&gcc GSBI4_QUP_CLK>, <&gcc GSBI4_H_CLK>;
658c2ecf20Sopenharmony_ci			clock-names = "core", "iface";
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci			clock-frequency = <200000>;
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci			#address-cells = <1>;
708c2ecf20Sopenharmony_ci			#size-cells = <0>;
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci		};
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci		uart4:	serial@16340000 {
758c2ecf20Sopenharmony_ci			compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
768c2ecf20Sopenharmony_ci			reg = <0x16340000 0x1000>,
778c2ecf20Sopenharmony_ci				<0x16300000 0x1000>;
788c2ecf20Sopenharmony_ci			interrupts = <0 152 0x0>;
798c2ecf20Sopenharmony_ci			clocks = <&gcc GSBI4_UART_CLK>, <&gcc GSBI4_H_CLK>;
808c2ecf20Sopenharmony_ci			clock-names = "core", "iface";
818c2ecf20Sopenharmony_ci		};
828c2ecf20Sopenharmony_ci	};
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ci	tcsr: syscon@1a400000 {
858c2ecf20Sopenharmony_ci		compatible = "qcom,apq8064-tcsr", "syscon";
868c2ecf20Sopenharmony_ci		reg = <0x1a400000 0x100>;
878c2ecf20Sopenharmony_ci	};
88