Skip to contentSkip to conversation

Samsung Galaxy Express SGH-I437 Support

PATCH Superseded Rudraksha Gupta 2 participants 6 messages Jun 6, 2023

Subsystems (5)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover Samsung Galaxy Express SGH-I437 Support

This patch series adds support for the Samsung Galaxy Express SGH-I437. Currently the following things work on this phone: UART, eMMC, SD Card, and USB.

version 4:
- Rebase onto rc1
- Fix qcom,usb-hs-phy.yaml patch so it doesn't break other devices

version 3:
- Added Ack
- Fixed compatible in qcom,usb-hs-phy.yaml. make dt_binding_check dtbs_check no longer complains about USB
- Fixed formatting in qcom-msm8960.dtsi and qcom-msm8960-samsung-expressatt.dts
- Fixed the spi1_default node in qcom-msm8960-samsung-expressatt.dts. make dt_binding_check dtbs_check no longer complains

version 2:
- Combined patch 1 into patch 4, as the sleep_clk label is specifically needed for the USB node.
- Reformatted the commit messages to align with the style used in other commit messages that modify the same files.
- Included a cover letter to provide an overview of the patch series.
- Slight refactoring of the device tree source (DTS) file.

Rudraksha Gupta (4):
dt-bindings: arm: qcom: Add Samsung Galaxy Express
dt-bindings: phy: qcom,usb-hs-phy: Add compatible
ARM: dts: qcom: msm8960: Add USB node
ARM: dts: qcom: Add Samsung Galaxy Express support

 .../devicetree/bindings/arm/qcom.yaml         |   1 +
 .../bindings/phy/qcom,usb-hs-phy.yaml         |   5 +-
 arch/arm/boot/dts/Makefile                    |   1 +
 .../dts/qcom-msm8960-samsung-expressatt.dts   | 331 ++++++++++++++++++
 arch/arm/boot/dts/qcom-msm8960.dtsi           |  34 +-
 5 files changed, 370 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/qcom-msm8960-samsung-expressatt.dts
Signature · 1 line
2.34.1
#1 lore raw

PATCH v4 1/4 dt-bindings: arm: qcom: Add Samsung Galaxy Express

Add a compatible for Samsung Galaxy Express SGH-I437.

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index d9dd25695c3d..133d69b2b73d 100644
@@ -191,6 +191,7 @@ properties:
       - items:
           - enum:
               - qcom,msm8960-cdp
+              - samsung,expressatt
           - const: qcom,msm8960
 
       - items:
Signature · 1 line
2.34.1
#2 lore raw

PATCH v4 2/4 dt-bindings: phy: qcom,usb-hs-phy: Add compatible

In reply to Rudraksha Gupta

Adds qcom,usb-hs-phy-msm8960 compatible

---
 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml +4 -1
index aa97478dd016..bdeffb52340b 100644
@@ -13,7 +13,9 @@ if:
   properties:
     compatible:
       contains:
-        const: qcom,usb-hs-phy-apq8064
+        anyOf:
+          - const: qcom,usb-hs-phy-apq8064
+          - const: qcom,usb-hs-phy-msm8960
 then:
   properties:
     resets:
@@ -40,6 +42,7 @@ properties:
           - qcom,usb-hs-phy-apq8064
           - qcom,usb-hs-phy-msm8226
           - qcom,usb-hs-phy-msm8916
+          - qcom,usb-hs-phy-msm8960
           - qcom,usb-hs-phy-msm8974
       - const: qcom,usb-hs-phy
 
Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v4 2/4] dt-bindings: phy: qcom,usb-hs-phy: Add compatible

Quoted 12 lines · Rudraksha Gupta

Adds qcom,usb-hs-phy-msm8960 compatible

---
 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml +0 -0
index aa97478dd016..bdeffb52340b 100644

Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml if: · line 16

Quoted 5 lines
Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml +1 -1
@@ -13,7 +13,9 @@ if:
   properties:
     compatible:
       contains:
-        const: qcom,usb-hs-phy-apq8064
+        anyOf:

Look at existing bindings how this is done. This should be enum. Best regards,
Krzysztof

#4 lore raw

PATCH v4 3/4 ARM: dts: qcom: msm8960: Add USB node

In reply to Rudraksha Gupta

Add the required nodes to support USB on the MSM8960 SoC. As it's very similar to the APQ8064 SoC, the nodes are almost identical

Add a label to sleep_clk for the USB node to reference

---
 arch/arm/boot/dts/qcom-msm8960.dtsi | 34 ++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)
arch/arm/boot/dts/qcom-msm8960.dtsi +33 -1
index 2a668cd535cc..581b3ab5c4ca 100644
@@ -3,6 +3,7 @@
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-msm8960.h>
+#include <dt-bindings/reset/qcom,gcc-msm8960.h>
 #include <dt-bindings/clock/qcom,lcc-msm8960.h>
 #include <dt-bindings/mfd/qcom-rpm.h>
 #include <dt-bindings/soc/qcom,gsbi.h>
@@ -71,7 +72,7 @@ pxo_board: pxo_board {
 			clock-output-names = "pxo_board";
 		};
 
-		sleep_clk {
+		sleep_clk: sleep_clk {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <32768>;
@@ -370,5 +371,36 @@ gsbi1_spi: spi@16080000 {
 				status = "disabled";
 			};
 		};
+
+		usb1: usb@12500000 {
+			compatible = "qcom,ci-hdrc";
+			reg = <0x12500000 0x200>,
+			      <0x12500200 0x200>;
+			interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc USB_HS1_XCVR_CLK>, <&gcc USB_HS1_H_CLK>;
+			clock-names = "core", "iface";
+			assigned-clocks = <&gcc USB_HS1_XCVR_CLK>;
+			assigned-clock-rates = <60000000>;
+			resets = <&gcc USB_HS1_RESET>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			ahb-burst-config = <0>;
+			phys = <&usb_hs1_phy>;
+			phy-names = "usb-phy";
+			#reset-cells = <1>;
+			status = "disabled";
+
+			ulpi {
+				usb_hs1_phy: phy {
+					compatible = "qcom,usb-hs-phy-msm8960",
+						     "qcom,usb-hs-phy";
+					clocks = <&sleep_clk>, <&cxo_board>;
+					clock-names = "sleep", "ref";
+					resets = <&usb1 0>;
+					reset-names = "por";
+					#phy-cells = <0>;
+				};
+			};
+		};
 	};
 };
Signature · 1 line
2.34.1
#5 lore raw

PATCH v4 4/4 ARM: dts: qcom: Add Samsung Galaxy Express support

In reply to Rudraksha Gupta

Add a very basic device tree file for the Samsung Galaxy Express SGH-I437. Currently, the following things work: UART, eMMC, SD Card, and USB.

---
 arch/arm/boot/dts/Makefile                    |   1 +
 .../dts/qcom-msm8960-samsung-expressatt.dts   | 331 ++++++++++++++++++
 2 files changed, 332 insertions(+)
 create mode 100644 arch/arm/boot/dts/qcom-msm8960-samsung-expressatt.dts
arch/arm/boot/dts/Makefile +1 -0
index 59829fc90315..12c90f263142 100644
@@ -1081,6 +1081,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-msm8916-samsung-grandmax.dtb \
 	qcom-msm8916-samsung-serranove.dtb \
 	qcom-msm8960-cdp.dtb \
+	qcom-msm8960-samsung-expressatt.dtb \
 	qcom-msm8974-lge-nexus5-hammerhead.dtb \
 	qcom-msm8974-sony-xperia-rhine-amami.dtb \
 	qcom-msm8974-sony-xperia-rhine-honami.dtb \
arch/arm/boot/dts/qcom-msm8960-samsung-expressatt.dts new file +331 -0

331 lines not on this page · raw message

Signature · 1 line
2.34.1