Add support for sm6115,4250 and OnePlus Nord N100
Subsystems (9)
v3 cover Add support for sm6115,4250 and OnePlus Nord N100
Changes from v2
---------------
v2: https://lore.kernel.org/all/[email protected]/
- fix ufs bindings to follow sdm845
- drop nvmem, firmware, reserved-range patches (merged)
- add patch that fixes sm6115-dwc3 bindings (4/9)
- add patch that fixes qcom,sm6115-sdhci bindings (5/9)
- add patch that fixes qcom,sm6115-qmp-ufs-phy bindings (6/9)
- drop dynamic reserved memory regions
- drop clock-output-names
- drop frequency for timer
- fix mmc pinctrl regression in v2
- move board clock freqs in relative scope
- fix indentation to please Konrad
- reorder some DT props (reg, status, compatible)
Changes from v1
---------------
v1: https://lore.kernel.org/all/[email protected]/
- merge dtsi patches in one
- fix ufs binding (allow ice register)
- fix dt schema issues (to the best of my ability)
- add a few necessary bindings (compats)
- some comments on remaining schema issues after commit msg (patch 7 and 9)
This series adds support for sm6115 (clocks, pinctrl, usb, ufs, sdhc), sm4250 (mostly empty shell on top of sm6115) and finally basic OnePlus Nord N100 (codename billie2), including the above mentiond items plus simple framebuffer.
Please note that this series depends on [1] (driver compat and bindings).
[1] https://lore.kernel.org/linux-devicetree/[email protected]/
Iskren Chernev (9):
dt-bindings: ufs: qcom: Add sm6115 binding
dt-bindings: arm: cpus: Add kryo240 compatible
dt-bindings: arm: qcom: Add compatible for oneplus,billie2 phone
dt-bindings: usb: qcom,dwc3: Fix SM6115 clocks, irqs
dt-bindings: mmc: sdhci-msm: Add pinctrl-1 property
dt-bindings: phy: qcom,qmp-ufs: Fix SM6115 clocks, regs
arm64: dts: qcom: sm6115: Add basic soc dtsi
arm64: dts: qcom: sm4250: Add soc dtsi
arm64: dts: qcom: sm4250: Add support for oneplus-billie2
.../devicetree/bindings/arm/cpus.yaml | 1 + .../devicetree/bindings/arm/qcom.yaml | 7 + .../devicetree/bindings/mmc/sdhci-msm.yaml | 4 + .../bindings/phy/qcom,qmp-ufs-phy.yaml | 3 +- .../devicetree/bindings/ufs/qcom,ufs.yaml | 26 + .../devicetree/bindings/usb/qcom,dwc3.yaml | 3 +- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm4250-oneplus-billie2.dts | 241 +++++ arch/arm64/boot/dts/qcom/sm4250.dtsi | 38 + arch/arm64/boot/dts/qcom/sm6115.dtsi | 857 ++++++++++++++++++ 10 files changed, 1179 insertions(+), 2 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts create mode 100644 arch/arm64/boot/dts/qcom/sm4250.dtsi create mode 100644 arch/arm64/boot/dts/qcom/sm6115.dtsi
Signature · 1 line
2.37.2
PATCH v3 1/9 dt-bindings: ufs: qcom: Add sm6115 binding
Add SM6115 UFS to DT schema.
--- .../devicetree/bindings/ufs/qcom,ufs.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+)
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml +26 -0
@@ -28,6 +28,7 @@ properties: - qcom,msm8998-ufshc - qcom,sc8280xp-ufshc - qcom,sdm845-ufshc + - qcom,sm6115-ufshc - qcom,sm6350-ufshc - qcom,sm8150-ufshc - qcom,sm8250-ufshc
@@ -178,6 +179,31 @@ allOf: minItems: 1 maxItems: 1 + - if: + properties: + compatible: + contains: + enum: + - qcom,sm6115-ufshc + then: + properties: + clocks: + minItems: 8 + maxItems: 8 + clock-names: + items: + - const: core_clk + - const: bus_aggr_clk + - const: iface_clk + - const: core_clk_unipro + - const: ref_clk + - const: tx_lane0_sync_clk + - const: rx_lane0_sync_clk + - const: ice_core_clk + reg: + minItems: 2 + maxItems: 2 + # TODO: define clock bindings for qcom,msm8994-ufshc unevaluatedProperties: false
Signature · 1 line
2.37.2
Re: [PATCH v3 1/9] dt-bindings: ufs: qcom: Add sm6115 binding
Quoted 5 lines · Iskren Chernev
Add SM6115 UFS to DT schema.
Signed-off-by Iskren Chernev <[email protected]>--- .../devicetree/bindings/ufs/qcom,ufs.yaml | 26 +++++++++++++++++++
Best regards,
Krzysztof
PATCH v3 2/9 dt-bindings: arm: cpus: Add kryo240 compatible
In reply to Iskren ChernevKryo240 is found in SM4250, the slower sibling of the SM6115.
--- Documentation/devicetree/bindings/arm/cpus.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/cpus.yaml +1 -0
@@ -174,6 +174,7 @@ properties: - nvidia,tegra194-carmel - qcom,krait - qcom,kryo + - qcom,kryo240 - qcom,kryo250 - qcom,kryo260 - qcom,kryo280
Signature · 1 line
2.37.2
PATCH v3 3/9 dt-bindings: arm: qcom: Add compatible for oneplus,billie2 phone
In reply to Iskren Chernevoneplus,billie2 (OnePlus Nord N100) is based on QualComm Snapdragon SM4250 SoC.
Add support for the same in dt-bindings.
--- Documentation/devicetree/bindings/arm/qcom.yaml | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +7 -0
@@ -54,6 +54,8 @@ description: | sdm845 sdx55 sdx65 + sm4250 + sm6115 sm6125 sm6350 sm7225
@@ -680,6 +682,11 @@ properties: - xiaomi,polaris - const: qcom,sdm845 + - items: + - enum: + - oneplus,billie2 + - const: qcom,sm4250 + - items: - enum: - sony,pdx201
Signature · 1 line
2.37.2
PATCH v3 4/9 dt-bindings: usb: qcom,dwc3: Fix SM6115 clocks, irqs
In reply to Iskren ChernevSM6115 has 6 clocks and 2 interrupts.
--- Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/usb/qcom,dwc3.yaml +2 -1
@@ -294,6 +294,7 @@ allOf: compatible: contains: enum: + - qcom,sm6115-dwc3 - qcom,sm6125-dwc3 - qcom,sm8150-dwc3 - qcom,sm8250-dwc3
@@ -348,7 +349,6 @@ allOf: - qcom,sdx55-dwc3 - qcom,sdx65-dwc3 - qcom,sm4250-dwc3 - - qcom,sm6115-dwc3 - qcom,sm6125-dwc3 - qcom,sm6350-dwc3 - qcom,sm8150-dwc3
@@ -380,6 +380,7 @@ allOf: - qcom,msm8953-dwc3 - qcom,msm8996-dwc3 - qcom,msm8998-dwc3 + - qcom,sm6115-dwc3 then: properties: interrupts:
Signature · 1 line
2.37.2
Re: [PATCH v3 4/9] dt-bindings: usb: qcom,dwc3: Fix SM6115 clocks, irqs
Quoted 5 lines · Iskren Chernev
SM6115 has 6 clocks and 2 interrupts.
Signed-off-by Iskren Chernev <[email protected]>--- Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 ++-
Best regards,
Krzysztof
PATCH v3 5/9 dt-bindings: mmc: sdhci-msm: Add pinctrl-1 property
In reply to Iskren ChernevMost mmc blocks contain two pinctrls, default and sleep. But then dt-schema complains about pinctrl-1 not being defined.
--- Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/mmc/sdhci-msm.yaml +4 -0
@@ -97,6 +97,10 @@ properties: description: Should specify pin control groups used for this controller. + pinctrl-1: + description: + Should specify sleep pin control groups used for this controller. + resets: maxItems: 1
Signature · 1 line
2.37.2
Re: [PATCH v3 5/9] dt-bindings: mmc: sdhci-msm: Add pinctrl-1 property
Quoted 4 lines · Iskren Chernev
Most mmc blocks contain two pinctrls, default and sleep. But then dt-schema complains about pinctrl-1 not being defined.
Signed-off-by Iskren Chernev <[email protected]>
Best regards,
Krzysztof
Re: [PATCH v3 5/9] dt-bindings: mmc: sdhci-msm: Add pinctrl-1 property
In reply to Iskren ChernevQuoted 13 lines · Iskren Chernev
Most mmc blocks contain two pinctrls, default and sleep. But then dt-schema complains about pinctrl-1 not being defined.
Signed-off-by Iskren Chernev <[email protected]>--- Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 4 ++++ 1 file changed, 4 insertions(+)Documentation/devicetree/bindings/mmc/sdhci-msm.yaml +0
-0
Documentation/devicetree/bindings/mmc/sdhci-msm.yaml properties: · line 106
Quoted 10 lines
Documentation/devicetree/bindings/mmc/sdhci-msm.yaml +4
-0@@ -97,6 +97,10 @@ properties: description: Should specify pin control groups used for this controller. + pinctrl-1: + description: + Should specify sleep pin control groups used for this controller. + resets: maxItems: 1
Thanks.
Re: [PATCH v3 5/9] dt-bindings: mmc: sdhci-msm: Add pinctrl-1 property
In reply to Iskren ChernevQuoted 5 lines · Iskren Chernev
Most mmc blocks contain two pinctrls, default and sleep. But then dt-schema complains about pinctrl-1 not being defined.
Signed-off-by Iskren Chernev <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 22 lines
--- Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 4 ++++ 1 file changed, 4 insertions(+)Documentation/devicetree/bindings/mmc/sdhci-msm.yaml +4
-1@@ -97,6 +97,10 @@ properties: description: Should specify pin control groups used for this controller. + pinctrl-1: + description: + Should specify sleep pin control groups used for this controller. + resets: maxItems: 1 --2.37.2
PATCH v3 6/9 dt-bindings: phy: qcom,qmp-ufs: Fix SM6115 clocks, regs
In reply to Iskren ChernevThe Sm6115 UFS PHY has 2 clocks and 3 regs.
--- Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml +2 -1
@@ -121,6 +121,7 @@ allOf: - qcom,sc8180x-qmp-ufs-phy - qcom,sc8280xp-qmp-ufs-phy - qcom,sdm845-qmp-ufs-phy + - qcom,sm6115-qmp-ufs-phy - qcom,sm6350-qmp-ufs-phy - qcom,sm8150-qmp-ufs-phy - qcom,sm8250-qmp-ufs-phy
@@ -180,7 +181,6 @@ allOf: contains: enum: - qcom,sc8180x-qmp-ufs-phy - - qcom,sm6115-qmp-ufs-phy then: patternProperties: "^phy@[0-9a-f]+$":
@@ -198,6 +198,7 @@ allOf: contains: enum: - qcom,msm8996-qmp-ufs-phy + - qcom,sm6115-qmp-ufs-phy then: patternProperties: "^phy@[0-9a-f]+$":
Signature · 7 lines
2.37.2 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: [PATCH v3 6/9] dt-bindings: phy: qcom,qmp-ufs: Fix SM6115 clocks, regs
Quoted 1 line · Iskren Chernev
The Sm6115 UFS PHY has 2 clocks and 3 regs.
Best regards,
Krzysztof
PATCH v3 7/9 arm64: dts: qcom: sm6115: Add basic soc dtsi
In reply to Iskren ChernevAdd support for Qualcomm SM6115 SoC. This includes:
- GCC
- Pinctrl
- RPM (CC+PD)
- USB
- MMC
- UFS
---
pending issues with dtschema:
- for some reason, using pinctrl phandles (in mmc) breaks the pinctrl
schema (4 times)
.output/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dtb: pinctrl@500000: sdc1-on-state: 'oneOf' conditional failed, one must be fixed:
'pins' is a required property
'clk', 'cmd', 'data', 'rclk' do not match any of the regexes: 'pinctrl-[0-9]+'
[[26]] is not of type 'object'
From schema: /home/iskren/src/pmos/linux-postmarketos/Documentation/devicetree/bindings/pinctrl/qcom,sm6115-pinctrl.yaml
- the ufs phy is actually a phy inside a phy, so the outher one requires
#phy-cells (according to dtschema python package). Maybe rename the outer
to phys@ because it's not used as a phy, only a holder of phys.
arch/arm64/boot/dts/qcom/sm6115.dtsi | 857 +++++++++++++++++++++++++++ 1 file changed, 857 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm6115.dtsi
arch/arm64/boot/dts/qcom/sm6115.dtsi new file +857 -0
@@ -0,0 +1,857 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2021, Iskren Chernev <[email protected]> + */ + +#include <dt-bindings/clock/qcom,gcc-sm6115.h> +#include <dt-bindings/clock/qcom,rpmcc.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/power/qcom-rpmpd.h> + +/ { + interrupt-parent = <&intc>; + + #address-cells = <2>; + #size-cells = <2>; + + chosen { }; + + clocks { + xo_board: xo-board { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + sleep_clk: sleep-clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + }; + + cpus { + #address-cells = <2>; + #size-cells = <0>; + + CPU0: cpu@0 { + device_type = "cpu"; + compatible = "qcom,kryo260"; + reg = <0x0 0x0>; + capacity-dmips-mhz = <1024>; + dynamic-power-coefficient = <100>; + enable-method = "psci"; + next-level-cache = <&L2_0>; + L2_0: l2-cache { + compatible = "cache"; + cache-level = <2>; + }; + }; + + CPU1: cpu@1 { + device_type = "cpu"; + compatible = "qcom,kryo260"; + reg = <0x0 0x1>; + capacity-dmips-mhz = <1024>; + dynamic-power-coefficient = <100>; + enable-method = "psci"; + next-level-cache = <&L2_0>; + }; + + CPU2: cpu@2 { + device_type = "cpu"; + compatible = "qcom,kryo260"; + reg = <0x0 0x2>; + capacity-dmips-mhz = <1024>; + dynamic-power-coefficient = <100>; + enable-method = "psci"; + next-level-cache = <&L2_0>; + }; + + CPU3: cpu@3 { + device_type = "cpu"; + compatible = "qcom,kryo260"; + reg = <0x0 0x3>; + capacity-dmips-mhz = <1024>; + dynamic-power-coefficient = <100>; + enable-method = "psci"; + next-level-cache = <&L2_0>; + }; + + CPU4: cpu@100 { + device_type = "cpu"; + compatible = "qcom,kryo260"; + reg = <0x0 0x100>; + enable-method = "psci"; + capacity-dmips-mhz = <1638>; + dynamic-power-coefficient = <282>; + next-level-cache = <&L2_1>; + L2_1: l2-cache { + compatible = "cache"; + cache-level = <2>; + }; + }; + + CPU5: cpu@101 { + device_type = "cpu"; + compatible = "qcom,kryo260"; + reg = <0x0 0x101>; + capacity-dmips-mhz = <1638>; + dynamic-power-coefficient = <282>; + enable-method = "psci"; + next-level-cache = <&L2_1>; + }; + + CPU6: cpu@102 { + device_type = "cpu"; + compatible = "qcom,kryo260"; + reg = <0x0 0x102>; + capacity-dmips-mhz = <1638>; + dynamic-power-coefficient = <282>; + enable-method = "psci"; + next-level-cache = <&L2_1>; + }; + + CPU7: cpu@103 { + device_type = "cpu"; + compatible = "qcom,kryo260"; + reg = <0x0 0x103>; + capacity-dmips-mhz = <1638>; + dynamic-power-coefficient = <282>; + enable-method = "psci"; + next-level-cache = <&L2_1>; + }; + + cpu-map { + cluster0 { + core0 { + cpu = <&CPU0>; + }; + + core1 { + cpu = <&CPU1>; + }; + + core2 { + cpu = <&CPU2>; + }; + + core3 { + cpu = <&CPU3>; + }; + }; + + cluster1 { + core0 { + cpu = <&CPU4>; + }; + + core1 { + cpu = <&CPU5>; + }; + + core2 { + cpu = <&CPU6>; + }; + + core3 { + cpu = <&CPU7>; + }; + }; + }; + }; + + firmware { + scm: scm { + compatible = "qcom,scm-sm6115", "qcom,scm"; + #reset-cells = <1>; + }; + }; + + memory@80000000 { + device_type = "memory"; + /* We expect the bootloader to fill in the size */ + reg = <0 0x80000000 0 0>; + }; + + pmu { + compatible = "arm,armv8-pmuv3"; + interrupts = <GIC_PPI 6 IRQ_TYPE_LEVEL_HIGH>; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + reserved_memory: reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + hyp_mem: memory@45700000 { + reg = <0x0 0x45700000 0x0 0x600000>; + no-map; + }; + + xbl_aop_mem: memory@45e00000 { + reg = <0x0 0x45e00000 0x0 0x140000>; + no-map; + }; + + sec_apps_mem: memory@45fff000 { + reg = <0x0 0x45fff000 0x0 0x1000>; + no-map; + }; + + smem_mem: memory@46000000 { + reg = <0x0 0x46000000 0x0 0x200000>; + no-map; + }; + + cdsp_sec_mem: memory@46200000 { + reg = <0x0 0x46200000 0x0 0x1e00000>; + no-map; + }; + + pil_modem_mem: memory@4ab00000 { + reg = <0x0 0x4ab00000 0x0 0x6900000>; + no-map; + }; + + pil_video_mem: memory@51400000 { + reg = <0x0 0x51400000 0x0 0x500000>; + no-map; + }; + + wlan_msa_mem: memory@51900000 { + reg = <0x0 0x51900000 0x0 0x100000>; + no-map; + }; + + pil_cdsp_mem: memory@51a00000 { + reg = <0x0 0x51a00000 0x0 0x1e00000>; + no-map; + }; + + pil_adsp_mem: memory@53800000 { + reg = <0x0 0x53800000 0x0 0x2800000>; + no-map; + }; + + pil_ipa_fw_mem: memory@56100000 { + reg = <0x0 0x56100000 0x0 0x10000>; + no-map; + }; + + pil_ipa_gsi_mem: memory@56110000 { + reg = <0x0 0x56110000 0x0 0x5000>; + no-map; + }; + + pil_gpu_mem: memory@56115000 { + reg = <0x0 0x56115000 0x0 0x2000>; + no-map; + }; + + cont_splash_memory: memory@5c000000 { + reg = <0x0 0x5c000000 0x0 0x00f00000>; + no-map; + }; + + dfps_data_memory: memory@5cf00000 { + reg = <0x0 0x5cf00000 0x0 0x0100000>; + no-map; + }; + + removed_mem: memory@60000000 { + reg = <0x0 0x60000000 0x0 0x3900000>; + no-map; + }; + }; + + rpm-glink { + compatible = "qcom,glink-rpm"; + + interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-sm6115"; + qcom,glink-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-sm6115", "qcom,rpmcc"; + #clock-cells = <1>; + }; + + rpmpd: power-controller { + compatible = "qcom,sm6115-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_min_svs: opp1 { + opp-level = <RPM_SMD_LEVEL_MIN_SVS>; + }; + + rpmpd_opp_low_svs: opp2 { + opp-level = <RPM_SMD_LEVEL_LOW_SVS>; + }; + + rpmpd_opp_svs: opp3 { + opp-level = <RPM_SMD_LEVEL_SVS>; + }; + + rpmpd_opp_svs_plus: opp4 { + opp-level = <RPM_SMD_LEVEL_SVS_PLUS>; + }; + + rpmpd_opp_nom: opp5 { + opp-level = <RPM_SMD_LEVEL_NOM>; + }; + + rpmpd_opp_nom_plus: opp6 { + opp-level = <RPM_SMD_LEVEL_NOM_PLUS>; + }; + + rpmpd_opp_turbo: opp7 { + opp-level = <RPM_SMD_LEVEL_TURBO>; + }; + + rpmpd_opp_turbo_plus: opp8 { + opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>; + }; + }; + }; + }; + }; + + smem { + compatible = "qcom,smem"; + memory-region = <&smem_mem>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + hwlocks = <&tcsr_mutex 3>; + }; + + soc: soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0xffffffff>; + + tlmm: pinctrl@500000 { + compatible = "qcom,sm6115-tlmm"; + reg = <0x500000 0x400000>, <0x900000 0x400000>, <0xd00000 0x400000>; + reg-names = "west", "south", "east"; + interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + gpio-ranges = <&tlmm 0 0 121>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + + sdc1_state_on: sdc1-on-state { + clk { + pins = "sdc1_clk"; + bias-disable; + drive-strength = <16>; + }; + + cmd { + pins = "sdc1_cmd"; + bias-pull-up; + drive-strength = <10>; + }; + + data { + pins = "sdc1_data"; + bias-pull-up; + drive-strength = <10>; + }; + + rclk { + pins = "sdc1_rclk"; + bias-pull-down; + }; + }; + + sdc1_state_off: sdc1-off-state { + clk { + pins = "sdc1_clk"; + bias-disable; + drive-strength = <2>; + }; + + cmd { + pins = "sdc1_cmd"; + bias-pull-up; + drive-strength = <2>; + }; + + data { + pins = "sdc1_data"; + bias-pull-up; + drive-strength = <2>; + }; + + rclk { + pins = "sdc1_rclk"; + bias-pull-down; + }; + }; + + sdc2_state_on: sdc2-on-state { + clk { + pins = "sdc2_clk"; + bias-disable; + drive-strength = <16>; + }; + + cmd { + pins = "sdc2_cmd"; + bias-pull-up; + drive-strength = <10>; + }; + + data { + pins = "sdc2_data"; + bias-pull-up; + drive-strength = <10>; + }; + + sd-cd { + pins = "gpio88"; + function = "gpio"; + bias-pull-up; + drive-strength = <2>; + }; + }; + + sdc2_state_off: sdc2-off-state { + clk { + pins = "sdc2_clk"; + bias-disable; + drive-strength = <2>; + }; + + cmd { + pins = "sdc2_cmd"; + bias-pull-up; + drive-strength = <2>; + }; + + data { + pins = "sdc2_data"; + bias-pull-up; + drive-strength = <2>; + }; + + sd-cd { + pins = "gpio88"; + function = "gpio"; + bias-disable; + drive-strength = <2>; + }; + }; + }; + + gcc: clock-controller@1400000 { + compatible = "qcom,gcc-sm6115"; + reg = <0x1400000 0x1f0000>; + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, <&sleep_clk>; + clock-names = "bi_tcxo", "sleep_clk"; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + + hsusb_phy: phy@1613000 { + compatible = "qcom,sm6115-qusb2-phy"; + reg = <0x1613000 0x180>; + #phy-cells = <0>; + + clocks = <&gcc GCC_AHB2PHY_USB_CLK>, <&rpmcc RPM_SMD_XO_CLK_SRC>; + clock-names = "cfg_ahb", "ref"; + + resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>; + nvmem-cells = <&qusb2_hstx_trim>; + + status = "disabled"; + }; + + qfprom@1b40000 { + compatible = "qcom,sm6115-qfprom", "qcom,qfprom"; + reg = <0x1b40000 0x7000>; + #address-cells = <1>; + #size-cells = <1>; + + qusb2_hstx_trim: hstx-trim@25b { + reg = <0x25b 0x1>; + bits = <1 4>; + }; + }; + + spmi_bus: spmi@1c40000 { + compatible = "qcom,spmi-pmic-arb"; + reg = <0x1c40000 0x1100>, + <0x1e00000 0x2000000>, + <0x3e00000 0x100000>, + <0x3f00000 0xa0000>, + <0x1c0a000 0x26000>; + reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; + interrupt-names = "periph_irq"; + interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>; + qcom,ee = <0>; + qcom,channel = <0>; + #address-cells = <2>; + #size-cells = <0>; + interrupt-controller; + #interrupt-cells = <4>; + }; + + tcsr_mutex: hwlock@1f40000 { + compatible = "qcom,tcsr-mutex"; + reg = <0x340000 0x20000>; + #hwlock-cells = <1>; + }; + + rpm_msg_ram: sram@45f0000 { + compatible = "qcom,rpm-msg-ram"; + reg = <0x45f0000 0x7000>; + }; + + sdhc_1: mmc@4744000 { + compatible = "qcom,sm6115-sdhci", "qcom,sdhci-msm-v5"; + reg = <0x4744000 0x1000>, <0x4745000 0x1000>, <0x4748000 0x8000>; + reg-names = "hc", "cqhci", "ice"; + + interrupts = <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "hc_irq", "pwr_irq"; + + clocks = <&gcc GCC_SDCC1_AHB_CLK>, + <&gcc GCC_SDCC1_APPS_CLK>, + <&xo_board>, + <&gcc GCC_SDCC1_ICE_CORE_CLK>; + clock-names = "iface", "core", "xo", "ice"; + + pinctrl-0 = <&sdc1_state_on>; + pinctrl-1 = <&sdc1_state_off>; + pinctrl-names = "default", "sleep"; + + bus-width = <8>; + status = "disabled"; + }; + + sdhc_2: mmc@4784000 { + compatible = "qcom,sm6115-sdhci", "qcom,sdhci-msm-v5"; + reg = <0x04784000 0x1000>; + reg-names = "hc"; + + interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "hc_irq", "pwr_irq"; + + clocks = <&gcc GCC_SDCC2_AHB_CLK>, <&gcc GCC_SDCC2_APPS_CLK>, <&xo_board>; + clock-names = "iface", "core", "xo"; + + pinctrl-0 = <&sdc2_state_on>; + pinctrl-1 = <&sdc2_state_off>; + pinctrl-names = "default", "sleep"; + + power-domains = <&rpmpd SM6115_VDDCX>; + operating-points-v2 = <&sdhc2_opp_table>; + iommus = <&apps_smmu 0x00a0 0x0>; + resets = <&gcc GCC_SDCC2_BCR>; + + bus-width = <4>; + qcom,dll-config = <0x0007642c>; + qcom,ddr-config = <0x80040868>; + status = "disabled"; + + sdhc2_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-100000000 { + opp-hz = /bits/ 64 <100000000>; + required-opps = <&rpmpd_opp_low_svs>; + }; + + opp-202000000 { + opp-hz = /bits/ 64 <202000000>; + required-opps = <&rpmpd_opp_nom>; + }; + }; + }; + + ufs_mem_hc: ufs@4804000 { + compatible = "qcom,sm6115-ufshc", "qcom,ufshc", "jedec,ufs-2.0"; + reg = <0x4804000 0x3000>, <0x4810000 0x8000>; + interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>; + phys = <&ufs_mem_phy_lanes>; + phy-names = "ufsphy"; + lanes-per-direction = <1>; + #reset-cells = <1>; + resets = <&gcc GCC_UFS_PHY_BCR>; + reset-names = "rst"; + + power-domains = <&gcc GCC_UFS_PHY_GDSC>; + iommus = <&apps_smmu 0x100 0>; + + clocks = <&gcc GCC_UFS_PHY_AXI_CLK>, + <&gcc GCC_SYS_NOC_UFS_PHY_AXI_CLK>, + <&gcc GCC_UFS_PHY_AHB_CLK>, + <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>, + <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>, + <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>, + <&gcc GCC_UFS_PHY_ICE_CORE_CLK>; + clock-names = "core_clk", + "bus_aggr_clk", + "iface_clk", + "core_clk_unipro", + "ref_clk", + "tx_lane0_sync_clk", + "rx_lane0_sync_clk", + "ice_core_clk"; + + freq-table-hz = <50000000 200000000>, + <0 0>, + <0 0>, + <37500000 150000000>, + <75000000 300000000>, + <0 0>, + <0 0>, + <0 0>; + + status = "disabled"; + }; + + ufs_mem_phy: phy@4807000 { + compatible = "qcom,sm6115-qmp-ufs-phy"; + reg = <0x4807000 0x1c4>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + clocks = <&gcc GCC_UFS_CLKREF_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; + clock-names = "ref", "ref_aux"; + + resets = <&ufs_mem_hc 0>; + reset-names = "ufsphy"; + status = "disabled"; + + ufs_mem_phy_lanes: phy@4807400 { + reg = <0x4807400 0x098>, + <0x4807600 0x130>, + <0x4807c00 0x16c>; + #phy-cells = <0>; + }; + }; + + usb3: usb@4ef8800 { + compatible = "qcom,sm6115-dwc3", "qcom,dwc3"; + reg = <0x04ef8800 0x400>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>, + <&gcc GCC_USB30_PRIM_MASTER_CLK>, + <&gcc GCC_SYS_NOC_USB3_PRIM_AXI_CLK>, + <&gcc GCC_USB30_PRIM_SLEEP_CLK>, + <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>, + <&gcc GCC_USB3_PRIM_CLKREF_CLK>; + clock-names = "cfg_noc", "core", "iface", "sleep", "mock_utmi", "xo"; + + assigned-clocks = <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>, + <&gcc GCC_USB30_PRIM_MASTER_CLK>; + assigned-clock-rates = <19200000>, <66666667>; + + interrupts = <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "hs_phy_irq", "ss_phy_irq"; + + resets = <&gcc GCC_USB30_PRIM_BCR>; + power-domains = <&gcc GCC_USB30_PRIM_GDSC>; + qcom,select-utmi-as-pipe-clk; + status = "disabled"; + + usb3_dwc3: usb@4e00000 { + compatible = "snps,dwc3"; + reg = <0x04e00000 0xcd00>; + interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>; + phys = <&hsusb_phy>; + phy-names = "usb2-phy"; + iommus = <&apps_smmu 0x120 0x0>; + snps,dis_u2_susphy_quirk; + snps,dis_enblslpm_quirk; + snps,has-lpm-erratum; + snps,hird-threshold = /bits/ 8 <0x10>; + snps,usb3_lpm_capable; + maximum-speed = "high-speed"; + dr_mode = "peripheral"; + }; + }; + + apps_smmu: iommu@c600000 { + compatible = "qcom,sm6115-smmu-500", "arm,mmu-500"; + reg = <0xc600000 0x80000>; + #iommu-cells = <2>; + #global-interrupts = <1>; + + interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>; + }; + + apcs_glb: mailbox@f111000 { + compatible = "qcom,sm6115-apcs-hmss-global"; + reg = <0xf111000 0x1000>; + + #mbox-cells = <1>; + }; + + timer@f120000 { + compatible = "arm,armv7-timer-mem"; + reg = <0xf120000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + clock-frequency = <19200000>; + + frame@f121000 { + reg = <0xf121000 0x1000>, <0xf122000 0x1000>; + frame-number = <0>; + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; + }; + + frame@f123000 { + reg = <0xf123000 0x1000>; + frame-number = <1>; + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + frame@f124000 { + reg = <0xf124000 0x1000>; + frame-number = <2>; + interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + frame@f125000 { + reg = <0xf125000 0x1000>; + frame-number = <3>; + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + frame@f126000 { + reg = <0xf126000 0x1000>; + frame-number = <4>; + interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + frame@f127000 { + reg = <0xf127000 0x1000>; + frame-number = <5>; + interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + frame@f128000 { + frame-number = <6>; + interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; + reg = <0xf128000 0x1000>; + status = "disabled"; + }; + }; + + intc: interrupt-controller@f200000 { + compatible = "arm,gic-v3"; + reg = <0xf200000 0x10000>, <0xf300000 0x100000>; + #interrupt-cells = <3>; + interrupt-controller; + interrupt-parent = <&intc>; + #redistributor-regions = <1>; + redistributor-stride = <0x0 0x20000>; + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 1 0xf08>, + <GIC_PPI 2 0xf08>, + <GIC_PPI 3 0xf08>, + <GIC_PPI 0 0xf08>; + }; +};
Signature · 1 line
2.37.2
Re: [PATCH v3 7/9] arm64: dts: qcom: sm6115: Add basic soc dtsi
Quoted 9 lines · Iskren Chernev
Add support for Qualcomm SM6115 SoC. This includes:
- GCC
- Pinctrl
- RPM (CC+PD)
- USB
- MMC
- UFSSigned-off-by Iskren Chernev <[email protected]>
Quoted 9 lines
---
pending issues with dtschema:
- for some reason, using pinctrl phandles (in mmc) breaks the pinctrl
schema (4 times)
.output/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dtb: pinctrl@500000: sdc1-on-state: 'oneOf' conditional failed, one must be fixed:
'pins' is a required property
'clk', 'cmd', 'data', 'rclk' do not match any of the regexes: 'pinctrl-[0-9]+'
[[26]] is not of type 'object'
From schema:/home/iskren/src/pmos/linux-postmarketos/Documentation/devicetree/bindings/pinctrl/qcom,sm6115-pinctrl.yaml
It's the same as 06367559766b7c9bd96d2baef8bfc5a9bb451e25. I propose to fix it the same way. I can do a biger change for all pinctrls, so here you would need to add "-pins" prefix to entries (see patch 4fcdaf4b0320f93d0ccb4d36b795ed258fb07b27).
Best regards,
Krzysztof
Re: [PATCH v3 7/9] arm64: dts: qcom: sm6115: Add basic soc dtsi
Quoted 20 lines · Krzysztof Kozlowski
Quoted 9 lines · Iskren Chernev
Add support for Qualcomm SM6115 SoC. This includes:
- GCC
- Pinctrl
- RPM (CC+PD)
- USB
- MMC
- UFSSigned-off-by Iskren Chernev <[email protected]>Quoted 9 lines
---
pending issues with dtschema:
- for some reason, using pinctrl phandles (in mmc) breaks the pinctrl
schema (4 times)
.output/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dtb: pinctrl@500000: sdc1-on-state: 'oneOf' conditional failed, one must be fixed:
'pins' is a required property
'clk', 'cmd', 'data', 'rclk' do not match any of the regexes: 'pinctrl-[0-9]+'
[[26]] is not of type 'object'
From schema:/home/iskren/src/pmos/linux-postmarketos/Documentation/devicetree/bindings/pinctrl/qcom,sm6115-pinctrl.yaml
Quoted 4 lines
It's the same as
06367559766b7c9bd96d2baef8bfc5a9bb451e25. I propose to fix it the same way. I can do a biger change for all pinctrls, so here you would need to add "-pins" prefix to entries (see patch4fcdaf4b0320f93d0ccb4d36b795ed258fb07b27).
OK, that makes sense. One thing that is a bit odd -- the current pattern "(pinconf|-pins)$" matches anything that ends in pinconf OR -pins (so it could be sth-pinconf). Also, if you only have a single block, isn't the idea to just list it in the -states node. I mean we either force everybody to nest with a pinconf, or we allow -pins for nested stuff and directly in -state for the non-nested. Just my 2c.
Quoted 2 lines
Best regards,
Krzysztof
Re: [PATCH v3 7/9] arm64: dts: qcom: sm6115: Add basic soc dtsi
Quoted 23 lines · Iskren Chernev
Quoted 20 lines · Krzysztof Kozlowski
Quoted 18 lines · Iskren Chernev
Add support for Qualcomm SM6115 SoC. This includes:
- GCC
- Pinctrl
- RPM (CC+PD)
- USB
- MMC
- UFSSigned-off-by Iskren Chernev <[email protected]>---
pending issues with dtschema:
- for some reason, using pinctrl phandles (in mmc) breaks the pinctrl
schema (4 times)
.output/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dtb: pinctrl@500000: sdc1-on-state: 'oneOf' conditional failed, one must be fixed:
'pins' is a required property
'clk', 'cmd', 'data', 'rclk' do not match any of the regexes: 'pinctrl-[0-9]+'
[[26]] is not of type 'object'
From schema:/home/iskren/src/pmos/linux-postmarketos/Documentation/devicetree/bindings/pinctrl/qcom,sm6115-pinctrl.yaml
Quoted 8 lines
Quoted 4 lines
It's the same as
06367559766b7c9bd96d2baef8bfc5a9bb451e25. I propose to fix it the same way. I can do a biger change for all pinctrls, so here you would need to add "-pins" prefix to entries (see patch4fcdaf4b0320f93d0ccb4d36b795ed258fb07b27).OK, that makes sense. One thing that is a bit odd -- the current pattern "(pinconf|-pins)$" matches anything that ends in pinconf OR -pins (so it could be sth-pinconf).
Yeah, I am fixing it to ^(pinconf|.*-pins)$
Quoted 4 lines
Also, if you only have a single block, isn't the idea to just list it in the -states node. I mean we either force everybody to nest with a pinconf, or we allow -pins for nested stuff and directly in -state for the non-nested. Just my 2c.
I didn't get this one... We allow exactly this, don't we (in PMIC GPIOs)?
Best regards,
Krzysztof
Re: [PATCH v3 7/9] arm64: dts: qcom: sm6115: Add basic soc dtsi
Quoted 33 lines · Krzysztof Kozlowski
Quoted 23 lines · Iskren Chernev
Quoted 20 lines · Krzysztof Kozlowski
Quoted 18 lines · Iskren Chernev
Add support for Qualcomm SM6115 SoC. This includes:
- GCC
- Pinctrl
- RPM (CC+PD)
- USB
- MMC
- UFSSigned-off-by Iskren Chernev <[email protected]>---
pending issues with dtschema:
- for some reason, using pinctrl phandles (in mmc) breaks the pinctrl
schema (4 times)
.output/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dtb: pinctrl@500000: sdc1-on-state: 'oneOf' conditional failed, one must be fixed:
'pins' is a required property
'clk', 'cmd', 'data', 'rclk' do not match any of the regexes: 'pinctrl-[0-9]+'
[[26]] is not of type 'object'
From schema:/home/iskren/src/pmos/linux-postmarketos/Documentation/devicetree/bindings/pinctrl/qcom,sm6115-pinctrl.yamlQuoted 8 lines
Quoted 4 lines
It's the same as
06367559766b7c9bd96d2baef8bfc5a9bb451e25. I propose to fix it the same way. I can do a biger change for all pinctrls, so here you would need to add "-pins" prefix to entries (see patch4fcdaf4b0320f93d0ccb4d36b795ed258fb07b27).OK, that makes sense. One thing that is a bit odd -- the current pattern "(pinconf|-pins)$" matches anything that ends in pinconf OR -pins (so it could be sth-pinconf).
Quoted 8 lines
Yeah, I am fixing it to ^(pinconf|.*-pins)$
Quoted 4 lines
Also, if you only have a single block, isn't the idea to just list it in the -states node. I mean we either force everybody to nest with a pinconf, or we allow -pins for nested stuff and directly in -state for the non-nested. Just my 2c.
I didn't get this one... We allow exactly this, don't we (in PMIC GPIOs)?
Currently the schema (you linked) has:
patternProperties:
'-state$':
oneOf:
- $ref: "#/$defs/qcom-pmic-gpio-state" // 1st case
- patternProperties: // 2nd case
"(pinconf|-pins)$":
$ref: "#/$defs/qcom-pmic-gpio-state"
additionalProperties: falseThe idea being that you can have
pinctrl@xxx {
basic-state { // this matches the first state in oneOf
pins: "gpio1";
funciton: "normal";
};
nested-state {
some-pins { // this matches the second state in oneOf
pins: "gpio1";
funciton: "normal";
};
other-pins {
pins: "gpio2"
funciton: "normal";
};
}
// but also, matching second state in oneOf
nested-basic-state {
pinconf {
pins: "gpio1";
funciton: "normal";
};
};
};So I'm saying, we should either choose basic-state and nested-state, in which case we don't need the "^pinconf$" variant, or we can have nested-state and nested-basic-state, in which case we don't need the 1st case of the oneOf.
Otherwise people have to choose between basic-state and nested-basic-state, which are equivalent in semantics.
On a tangent -- why specifying the .* regex of pinctrl subnodes has effect on pinctrl references in other nodes. I.e I don't understand why this fix fixes the issue (but it does).
Quoted 2 lines
Best regards,
Krzysztof
Re: [PATCH v3 7/9] arm64: dts: qcom: sm6115: Add basic soc dtsi
Quoted 25 lines · Iskren Chernev
basic-state { // this matches the first state in oneOf
pins: "gpio1";
funciton: "normal";
};
nested-state {
some-pins { // this matches the second state in oneOf
pins: "gpio1";
funciton: "normal";
};
other-pins {
pins: "gpio2"
funciton: "normal";
};
}
// but also, matching second state in oneOf
nested-basic-state {
pinconf {
pins: "gpio1";
funciton: "normal";
};
};
};Quoted 3 lines
So I'm saying, we should either choose basic-state and nested-state, in which case we don't need the "^pinconf$" variant, or we can have nested-state and nested-basic-state, in which case we don't need the 1st case of the oneOf.
Ah, I get it.
Quoted 3 lines
Otherwise people have to choose between basic-state and nested-basic-state, which are equivalent in semantics.
Yeah, I can drop pinconf. I put it in the PMIC because it was used, but I don't find it for TLMM pinctrl nodes.
Quoted 4 lines
On a tangent -- why specifying the .* regex of pinctrl subnodes has effect on pinctrl references in other nodes. I.e I don't understand why this fix fixes the issue (but it does).
Because it works on DTB and finds linux,phandle. This might be some bug in dtschema, but anyway better to have a bit stricter patterns in bindings.
Best regards,
Krzysztof
Re: [PATCH v3 7/9] arm64: dts: qcom: sm6115: Add basic soc dtsi
Quoted 30 lines · Krzysztof Kozlowski
Quoted 25 lines · Iskren Chernev
basic-state { // this matches the first state in oneOf pins: "gpio1"; funciton: "normal"; }; nested-state { some-pins { // this matches the second state in oneOf pins: "gpio1"; funciton: "normal"; }; other-pins { pins: "gpio2" funciton: "normal"; }; } // but also, matching second state in oneOf nested-basic-state { pinconf { pins: "gpio1"; funciton: "normal"; }; }; };Quoted 3 lines
So I'm saying, we should either choose basic-state and nested-state, in which case we don't need the "^pinconf$" variant, or we can have nested-state and nested-basic-state, in which case we don't need the 1st case of the oneOf.
Quoted 8 lines
Ah, I get it.
Quoted 3 lines
Otherwise people have to choose between basic-state and nested-basic-state, which are equivalent in semantics.
Yeah, I can drop pinconf. I put it in the PMIC because it was used, but I don't find it for TLMM pinctrl nodes.
Frankly I'm not sure which is better, to drop pinconf, or to use it (and drop basic case). You probably have more experience and taste regarding that. Another thing is that you normally specify one pin at a time in the nested case, so having -pins is a bit confusing. Maybe it should allow -pin and -pins.
I understand that you technically can't change existing bindings (because they're immutable), but at least for the future you can pick something that will stand, so I wouldn't be too concerned about existing ones :)
Quoted 7 lines
Quoted 4 lines
On a tangent -- why specifying the .* regex of pinctrl subnodes has effect on pinctrl references in other nodes. I.e I don't understand why this fix fixes the issue (but it does).
Because it works on DTB and finds linux,phandle. This might be some bug in dtschema, but anyway better to have a bit stricter patterns in bindings.
I see, the phandle node appears only when you use a reference, not when you define it... there should be a way to handle that more precisely. phandle is a very special case. Also additional-properties is smart enough to allow it.
Quoted 3 lines
Best regards,
Krzysztof
Bjorn Andersson
maintainerRe: [PATCH v3 7/9] arm64: dts: qcom: sm6115: Add basic soc dtsi
In reply to Iskren ChernevOn Sat, Sep 10, 2022 at 05:32:11PM +0300, Iskren Chernev wrote:
[..]
Quoted 1 line
arch/arm64/boot/dts/qcom/sm6115.dtsi +0
-0
[..]
arch/arm64/boot/dts/qcom/sm6115.dtsi line 333
Quoted 3 lines
arch/arm64/boot/dts/qcom/sm6115.dtsi +3
-0+ + smem { + compatible = "qcom,smem";
Please move the compatible, qcom,rpm-msg-ram and hwlocks into the &smem_mem node.
arch/arm64/boot/dts/qcom/sm6115.dtsi line 339
Quoted 6 lines
arch/arm64/boot/dts/qcom/sm6115.dtsi +6
-0+ memory-region = <&smem_mem>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + hwlocks = <&tcsr_mutex 3>; + }; + + soc: soc {
I expect that you should be told that you're missing a @0 on your soc.
arch/arm64/boot/dts/qcom/sm6115.dtsi line 345
Quoted 6 lines
arch/arm64/boot/dts/qcom/sm6115.dtsi +6
-0+ compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0xffffffff>; + + tlmm: pinctrl@500000 {
Please sort your nodes based on address, followed by node name alphabetically, followed by label.
arch/arm64/boot/dts/qcom/sm6115.dtsi line 347
Quoted 2 lines
arch/arm64/boot/dts/qcom/sm6115.dtsi +2
-0+ compatible = "qcom,sm6115-tlmm"; + reg = <0x500000 0x400000>, <0x900000 0x400000>, <0xd00000 0x400000>;
Please pad your address to 8 digits, to make it faster to see if the sort order makes sense.
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm6115.dtsi +8
-0+ reg-names = "west", "south", "east"; + interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + gpio-ranges = <&tlmm 0 0 121>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; +
[..]
arch/arm64/boot/dts/qcom/sm6115.dtsi line 855
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm6115.dtsi +8
-0+ }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 1 0xf08>, + <GIC_PPI 2 0xf08>, + <GIC_PPI 3 0xf08>, + <GIC_PPI 0 0xf08>;
Please use (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW) for your flags.
Regards,
Bjorn
PATCH v3 8/9 arm64: dts: qcom: sm4250: Add soc dtsi
In reply to Iskren ChernevThe SM4250 is a downclocked version of the SM6115.
--- arch/arm64/boot/dts/qcom/sm4250.dtsi | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm4250.dtsi
arch/arm64/boot/dts/qcom/sm4250.dtsi new file +38 -0
@@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2021, Iskren Chernev <[email protected]> + */ + +#include "sm6115.dtsi" + +&CPU0 { + compatible = "qcom,kryo240"; +}; + +&CPU1 { + compatible = "qcom,kryo240"; +}; + +&CPU2 { + compatible = "qcom,kryo240"; +}; + +&CPU3 { + compatible = "qcom,kryo240"; +}; + +&CPU4 { + compatible = "qcom,kryo240"; +}; + +&CPU5 { + compatible = "qcom,kryo240"; +}; + +&CPU6 { + compatible = "qcom,kryo240"; +}; + +&CPU7 { + compatible = "qcom,kryo240"; +};
Signature · 1 line
2.37.2
PATCH v3 9/9 arm64: dts: qcom: sm4250: Add support for oneplus-billie2
In reply to Iskren ChernevAdd initial support for OnePlus Nord N100, based on SM4250. Currently working:
- boots
- usb
- buildin flash storage (UFS)
- SD card reader
--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm4250-oneplus-billie2.dts | 241 ++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -137,6 +137,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-polaris.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-samsung-w737.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm4250-oneplus-billie2.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6125-sony-xperia-seine-pdx201.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6350-sony-xperia-lena-pdx213.dtb dtb-$(CONFIG_ARCH_QCOM) += sm7225-fairphone-fp4.dtb
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +241 -0
241 lines not on this page · raw message
Signature · 1 line
2.37.2
Bjorn Andersson
maintainerRe: [PATCH v3 9/9] arm64: dts: qcom: sm4250: Add support for oneplus-billie2
Quoted 32 lines · Iskren Chernev
Add initial support for OnePlus Nord N100, based on SM4250. Currently working:
- boots
- usb
- buildin flash storage (UFS)
- SD card readerSigned-off-by Iskren Chernev <[email protected]>--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm4250-oneplus-billie2.dts | 241 ++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dtsarch/arm64/boot/dts/qcom/Makefile +1
-0@@ -137,6 +137,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-polaris.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-samsung-w737.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm4250-oneplus-billie2.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6125-sony-xperia-seine-pdx201.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6350-sony-xperia-lena-pdx213.dtb dtb-$(CONFIG_ARCH_QCOM) += sm7225-fairphone-fp4.dtbarch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +0
-0
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts line 1
Quoted 1 line
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +1
-0@@ -0,0 +1,241 @@ +// SPDX-License-Identifier: GPL-2.0-only
Would it be possible for you to dual license this?
Quoted 36 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +36
-0+/* + * Copyright (c) 2021, Iskren Chernev <[email protected]> + */ + +/dts-v1/; + +#include "sm4250.dtsi" + +/ { + model = "OnePlus Nord N100"; + compatible = "oneplus,billie2", "qcom,sm4250"; + + /* required for bootloader to select correct board */ + qcom,msm-id = <0x1a1 0x10000 0x1bc 0x10000>; + qcom,board-id = <0x1000b 0x00>; + + aliases { + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + stdout-path = "framebuffer0"; + + framebuffer0: framebuffer@9d400000 { + compatible = "simple-framebuffer"; + reg = <0 0x5c000000 0 (1600 * 720 * 4)>; + width = <720>; + height = <1600>; + stride = <(720 * 4)>; + format = "a8r8g8b8"; + }; + }; +};
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts line 47
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +10
-0+ +&xo_board { + clock-frequency = <19200000>; +}; + +&sleep_clk { + clock-frequency = <32764>; +}; + +&reserved_memory {
As the number of nodes grow it would be nice if these were sorted alphabetically.
Quoted 28 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +28
-0+ bootloader_log_mem: memory@5fff7000 { + reg = <0x00 0x5fff7000 0x00 0x8000>; + no-map; + }; + + ramoops@cbe00000 { + compatible = "ramoops"; + reg = <0x0 0xcbe00000 0x0 0x400000>; + record-size = <0x40000>; + pmsg-size = <0x200000>; + console-size = <0x40000>; + ftrace-size = <0x40000>; + }; + + param_mem: memory@cc200000 { + reg = <0x00 0xcc200000 0x00 0x100000>; + no-map; + }; + + mtp_mem: memory@cc300000 { + reg = <0x00 0xcc300000 0x00 0xb00000>; + no-map; + }; +}; + +&usb3 { + status = "okay"; +};
[..]
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts line 113
Quoted 2 lines
+&rpm_requests {
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +1
-0+ regulators-0 {
Is there a reason why you don't call this node pm6125-regulators ?
Quoted 6 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +6
-0+ compatible = "qcom,rpm-pm6125-regulators"; + + vreg_s6a: s6 { + regulator-min-microvolt = <320000>; + regulator-max-microvolt = <1456000>; + };
[..]
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts line 239
Quoted 4 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +4
-0+ vreg_l24a: l24 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <3544000>; + };
Just as a heads up, by not ensuring that your regulators are in high-power-mode you risk seeing brown-outs - something we keep running into for e.g. SD-cards.
Regards,
Bjorn
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +2
-0+ }; +};Signature · 1 line
2.37.2
Re: [PATCH v3 9/9] arm64: dts: qcom: sm4250: Add support for oneplus-billie2
Quoted 116 lines · Bjorn Andersson
Quoted 32 lines · Iskren Chernev
Add initial support for OnePlus Nord N100, based on SM4250. Currently working:
- boots
- usb
- buildin flash storage (UFS)
- SD card readerSigned-off-by Iskren Chernev <[email protected]>--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm4250-oneplus-billie2.dts | 241 ++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dtsarch/arm64/boot/dts/qcom/Makefile +1
-0@@ -137,6 +137,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-polaris.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-samsung-w737.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm4250-oneplus-billie2.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6125-sony-xperia-seine-pdx201.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6350-sony-xperia-lena-pdx213.dtb dtb-$(CONFIG_ARCH_QCOM) += sm7225-fairphone-fp4.dtbarch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +0
-0arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts line 1
Quoted 1 line
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +1
-0@@ -0,0 +1,241 @@ +// SPDX-License-Identifier: GPL-2.0-onlyWould it be possible for you to dual license this?
Quoted 36 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +36
-0+/* + * Copyright (c) 2021, Iskren Chernev <[email protected]> + */ + +/dts-v1/; + +#include "sm4250.dtsi" + +/ { + model = "OnePlus Nord N100"; + compatible = "oneplus,billie2", "qcom,sm4250"; + + /* required for bootloader to select correct board */ + qcom,msm-id = <0x1a1 0x10000 0x1bc 0x10000>; + qcom,board-id = <0x1000b 0x00>; + + aliases { + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + stdout-path = "framebuffer0"; + + framebuffer0: framebuffer@9d400000 { + compatible = "simple-framebuffer"; + reg = <0 0x5c000000 0 (1600 * 720 * 4)>; + width = <720>; + height = <1600>; + stride = <(720 * 4)>; + format = "a8r8g8b8"; + }; + }; +};arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts line 47
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +10
-0+ +&xo_board { + clock-frequency = <19200000>; +}; + +&sleep_clk { + clock-frequency = <32764>; +}; + +&reserved_memory {As the number of nodes grow it would be nice if these were sorted alphabetically.
Quoted 28 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +28
-0+ bootloader_log_mem: memory@5fff7000 { + reg = <0x00 0x5fff7000 0x00 0x8000>; + no-map; + }; + + ramoops@cbe00000 { + compatible = "ramoops"; + reg = <0x0 0xcbe00000 0x0 0x400000>; + record-size = <0x40000>; + pmsg-size = <0x200000>; + console-size = <0x40000>; + ftrace-size = <0x40000>; + }; + + param_mem: memory@cc200000 { + reg = <0x00 0xcc200000 0x00 0x100000>; + no-map; + }; + + mtp_mem: memory@cc300000 { + reg = <0x00 0xcc300000 0x00 0xb00000>; + no-map; + }; +}; + +&usb3 { + status = "okay"; +};[..]
Quoted 4 lines
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts line 113
Quoted 2 lines
+&rpm_requests {
arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts new file +1
-0+ regulators-0 {Is there a reason why you don't call this node pm6125-regulators ?
It's the follow up of:
https://lore.kernel.org/all/[email protected]/
Node names should be rather generic, so just regulators.
Best regards,
Krzysztof