From: Andy Gross <agross@codeaurora.org>
To: linux-arm-msm@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@sonymobile.com>,
Kumar Gala <galak@codeaurora.org>,
devicetree@vger.kernel.org, Andy Gross <agross@codeaurora.org>
Subject: [PATCH 2/2] soc: qcom: Add device tree binding for TCSR
Date: Thu, 8 Jan 2015 16:52:57 -0600 [thread overview]
Message-ID: <1420757577-20425-3-git-send-email-agross@codeaurora.org> (raw)
In-Reply-To: <1420757577-20425-1-git-send-email-agross@codeaurora.org>
Add device tree binding support for the QCOM TCSR driver.
Signed-off-by: Andy Gross <agross@codeaurora.org>
---
.../devicetree/bindings/soc/qcom/qcom,tcsr.txt | 33 +++++++++++++++++++
include/dt-bindings/soc/qcom,tcsr.h | 34 ++++++++++++++++++++
2 files changed, 67 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,tcsr.txt
create mode 100644 include/dt-bindings/soc/qcom,tcsr.h
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,tcsr.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,tcsr.txt
new file mode 100644
index 0000000..782a307
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,tcsr.txt
@@ -0,0 +1,33 @@
+QCOM TCSR (Top Control and Status Register) Driver
+
+The TCSR provides miscellaneous control functions and status registers for
+Qualcomm processors.
+
+Required properties:
+- compatible: must contain "qcom,tcsr" for IPQ806x and APQ8064
+- reg: Address range for TCSR registers
+
+Optional properties:
+- qcom,usb-ctrl-select : indicates USB port type selection. Please reference
+ dt-bindings/soc/qcom,tcsr.h for valid USB port selection values.
+- qcom,adm-a-crci-mux-sel : indicates the CRCI mux settings for peripherals.
+ Please reference dt-bindings/soc/qcom,tcsr.h for valid selection values.
+- qcom,adm-b-crci-mux-sel : indicates the CRCI mux settings for peripherals.
+ Please reference dt-bindings/soc/qcom,tcsr.h for valid selection values.
+
+Example for IPQ8064:
+
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+ tcsr: tcsr@1a400000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1a400000 0x100>;
+
+ qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
+ qcom,adm-a-crci-mux-sel =
+ < TCSR_ADM_CRCI_SEL(GSBI1, ADM_CRCI_QUP)>;
+ qcom,adm-b-crci-mux-sel =
+ < TCSR_ADM_CRCI_SEL(GSBI1, ADM_CRCI_QUP)>;
+ };
+
+
diff --git a/include/dt-bindings/soc/qcom,tcsr.h b/include/dt-bindings/soc/qcom,tcsr.h
new file mode 100644
index 0000000..8e18354
--- /dev/null
+++ b/include/dt-bindings/soc/qcom,tcsr.h
@@ -0,0 +1,34 @@
+/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#ifndef __DT_BINDINGS_QCOM_TCSR_H
+#define __DT_BINDINGS_QCOM_TCSR_H
+
+#define TCSR_USB_SELECT_USB3_P0 0x1
+#define TCSR_USB_SELECT_USB3_P1 0x2
+#define TCSR_USB_SELECT_USB3_DUAL 0x3
+
+#define GSBI1 1
+#define GSBI2 2
+#define GSBI3 3
+#define GSBI4 4
+#define GSBI5 5
+#define GSBI6 6
+#define GSBI7 7
+
+/* values are in pairs - RX/TX. So both are 0 or both are 1 */
+#define ADM_CRCI_QUP 0
+#define ADM_CRCI_UART 3
+
+/* calculate CRCI value by shifting the value by correct shift */
+#define TCSR_ADM_CRCI_SEL(gsbi, val) (val << (gsbi-1)*2)
+
+#endif
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
WARNING: multiple messages have this Message-ID (diff)
From: agross@codeaurora.org (Andy Gross)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] soc: qcom: Add device tree binding for TCSR
Date: Thu, 8 Jan 2015 16:52:57 -0600 [thread overview]
Message-ID: <1420757577-20425-3-git-send-email-agross@codeaurora.org> (raw)
In-Reply-To: <1420757577-20425-1-git-send-email-agross@codeaurora.org>
Add device tree binding support for the QCOM TCSR driver.
Signed-off-by: Andy Gross <agross@codeaurora.org>
---
.../devicetree/bindings/soc/qcom/qcom,tcsr.txt | 33 +++++++++++++++++++
include/dt-bindings/soc/qcom,tcsr.h | 34 ++++++++++++++++++++
2 files changed, 67 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,tcsr.txt
create mode 100644 include/dt-bindings/soc/qcom,tcsr.h
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,tcsr.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,tcsr.txt
new file mode 100644
index 0000000..782a307
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,tcsr.txt
@@ -0,0 +1,33 @@
+QCOM TCSR (Top Control and Status Register) Driver
+
+The TCSR provides miscellaneous control functions and status registers for
+Qualcomm processors.
+
+Required properties:
+- compatible: must contain "qcom,tcsr" for IPQ806x and APQ8064
+- reg: Address range for TCSR registers
+
+Optional properties:
+- qcom,usb-ctrl-select : indicates USB port type selection. Please reference
+ dt-bindings/soc/qcom,tcsr.h for valid USB port selection values.
+- qcom,adm-a-crci-mux-sel : indicates the CRCI mux settings for peripherals.
+ Please reference dt-bindings/soc/qcom,tcsr.h for valid selection values.
+- qcom,adm-b-crci-mux-sel : indicates the CRCI mux settings for peripherals.
+ Please reference dt-bindings/soc/qcom,tcsr.h for valid selection values.
+
+Example for IPQ8064:
+
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+ tcsr: tcsr at 1a400000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1a400000 0x100>;
+
+ qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
+ qcom,adm-a-crci-mux-sel =
+ < TCSR_ADM_CRCI_SEL(GSBI1, ADM_CRCI_QUP)>;
+ qcom,adm-b-crci-mux-sel =
+ < TCSR_ADM_CRCI_SEL(GSBI1, ADM_CRCI_QUP)>;
+ };
+
+
diff --git a/include/dt-bindings/soc/qcom,tcsr.h b/include/dt-bindings/soc/qcom,tcsr.h
new file mode 100644
index 0000000..8e18354
--- /dev/null
+++ b/include/dt-bindings/soc/qcom,tcsr.h
@@ -0,0 +1,34 @@
+/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#ifndef __DT_BINDINGS_QCOM_TCSR_H
+#define __DT_BINDINGS_QCOM_TCSR_H
+
+#define TCSR_USB_SELECT_USB3_P0 0x1
+#define TCSR_USB_SELECT_USB3_P1 0x2
+#define TCSR_USB_SELECT_USB3_DUAL 0x3
+
+#define GSBI1 1
+#define GSBI2 2
+#define GSBI3 3
+#define GSBI4 4
+#define GSBI5 5
+#define GSBI6 6
+#define GSBI7 7
+
+/* values are in pairs - RX/TX. So both are 0 or both are 1 */
+#define ADM_CRCI_QUP 0
+#define ADM_CRCI_UART 3
+
+/* calculate CRCI value by shifting the value by correct shift */
+#define TCSR_ADM_CRCI_SEL(gsbi, val) (val << (gsbi-1)*2)
+
+#endif
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2015-01-08 22:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 22:52 [PATCH 0/2] Add Qualcomm TCSR driver Andy Gross
2015-01-08 22:52 ` Andy Gross
2015-01-08 22:52 ` [PATCH 1/2] soc: qcom: Add " Andy Gross
2015-01-08 22:52 ` Andy Gross
2015-01-08 23:39 ` Stephen Boyd
2015-01-08 23:39 ` Stephen Boyd
[not found] ` <54AF1540.6090800-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-01-09 17:10 ` Andy Gross
2015-01-09 17:10 ` Andy Gross
2015-01-09 17:10 ` Andy Gross
[not found] ` <1420757577-20425-2-git-send-email-agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-01-09 0:06 ` Arnd Bergmann
2015-01-09 0:06 ` Arnd Bergmann
2015-01-09 0:06 ` Arnd Bergmann
2015-01-09 17:13 ` Andy Gross
2015-01-09 17:13 ` Andy Gross
2015-01-09 17:13 ` Andy Gross
2015-01-09 18:31 ` Bjorn Andersson
2015-01-09 18:31 ` Bjorn Andersson
2015-01-08 22:52 ` Andy Gross [this message]
2015-01-08 22:52 ` [PATCH 2/2] soc: qcom: Add device tree binding for TCSR Andy Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1420757577-20425-3-git-send-email-agross@codeaurora.org \
--to=agross@codeaurora.org \
--cc=bjorn.andersson@sonymobile.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.