Skip to contentSkip to conversation

Samsung Galaxy Express SGH-I437 Support

PATCH Applied Rudraksha Gupta 4 participants 8 messages Jun 7, 2023 – Jun 21, 2023

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v5 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 5:
- use enum instead of anyOf in qcom,usb-hs-phy.yaml

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 v5 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 v5 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..f042d6af1594 100644
@@ -13,7 +13,9 @@ if:
   properties:
     compatible:
       contains:
-        const: qcom,usb-hs-phy-apq8064
+        enum:
+          - qcom,usb-hs-phy-apq8064
+          - 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
maintainer Applied
#4 lore raw

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

In reply to Rudraksha Gupta
Quoted 1 line · Rudraksha Gupta

Adds qcom,usb-hs-phy-msm8960 compatible

Applied, thanks

Signature · 1 line
~Vinod
#5 lore raw

PATCH v5 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
#6 lore raw

PATCH v5 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
maintainer Applied
#7 lore raw

Re: (subset) [PATCH v5 0/4] Samsung Galaxy Express SGH-I437 Support

In reply to Rudraksha Gupta
Quoted 8 lines · Rudraksha Gupta

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 5:
- use enum instead of anyOf in qcom,usb-hs-phy.yaml

[...]

Applied, thanks!

[3/4] ARM: dts: qcom: msm8960: Add USB node

      commit: 80ce22e5cbe705ff2e113890828d44aa0b3ad96f
[4/4] ARM: dts: qcom: Add Samsung Galaxy Express support
      commit: 2b01dda16124696c4b64edcd31e8c2d37c559998

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>