From 176815956535335881bcc0f880355b12683d5560 Mon Sep 17 00:00:00 2001 From: Karel Balej Date: Sun, 24 Sep 2023 16:42:33 +0200 Subject: [PATCH] DONOTMERGE: dt-bindings: samsung,coreprimevelte: add SDIO Signed-off-by: Karel Balej --- arch/arm64/boot/dts/marvell/88pm886.dtsi | 12 +- .../pxa1908-samsung-coreprimevelte.dts | 116 +++++++++++++++++- 2 files changed, 122 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/88pm886.dtsi b/arch/arm64/boot/dts/marvell/88pm886.dtsi index f5c6084673e4..be05e75a30d4 100644 --- a/arch/arm64/boot/dts/marvell/88pm886.dtsi +++ b/arch/arm64/boot/dts/marvell/88pm886.dtsi @@ -11,6 +11,7 @@ &pmic0 { compatible = "marvell,88pm886"; /* ---buck--- */ + /* vccmain: regulator-buck1 { compatible = "marvell,88pm886-buck1"; regulator-min-microvolt = <600000>; @@ -18,13 +19,15 @@ regulator-always-on; regulator-boot-on; }; + */ buck2: regulator-buck2 { compatible = "marvell,88pm886-buck2"; - regulator-min-microvolt = <600000>; - regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; regulator-always-on; regulator-boot-on; }; + /* vddr: regulator-buck3 { compatible = "marvell,88pm886-buck3"; regulator-min-microvolt = <600000>; @@ -46,6 +49,7 @@ regulator-always-on; regulator-boot-on; }; + */ /* ---ldo--- */ /* @@ -121,11 +125,13 @@ regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3300000>; }; + */ ldo15: regulator-ldo15 { compatible = "marvell,88pm886-ldo15"; - regulator-min-microvolt = <1200000>; + regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + /* ldo16: regulator-ldo16 { compatible = "marvell,88pm886-ldo16"; regulator-min-microvolt = <1700000>; diff --git a/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts b/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts index cf327941ffab..f8d3bc6d04d5 100644 --- a/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts +++ b/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts @@ -2,8 +2,6 @@ #include "pxa1908.dtsi" #include #include -// FIXME -#define IRQF_TRIGGER_HIGH 0x00000004 / { pxa,rev-id = <3928 2>; @@ -13,6 +11,7 @@ aliases { mmc0 = &sdh2; /* eMMC */ mmc1 = &sdh0; /* SD card */ + mmc2 = &sdh1; /* SDIO */ serial0 = &uart0; }; @@ -125,6 +124,12 @@ enable-gpios = <&gpio 97 GPIO_ACTIVE_LOW>; max-brightness = <210>; }; + + wlan_pwrseq: pwrseq0 { + compatible = "mmc-pwrseq-simple"; + powerdown-gpios = <&gpio 57 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>; + }; }; &smmu { @@ -296,6 +301,79 @@ pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; pinctrl-single,low-power-mode = <0x208 0x388>; }; + + sdh1_pins_1: pinmux-sdh1-1 { + pinctrl-single,pins = < + 0x170 1 + 0x174 1 + 0x178 1 + 0x17c 1 + 0x180 1>; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + sdh1_pins_2: pinmux-sdh1-2 { + pinctrl-single,pins = <0x184 1>; + pinctrl-single,drive-strength = <0x800 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0x208 0x388>; + }; + + sdh1_pins_3: pinmux-sdh1-3 { + pinctrl-single,pins = <0xec 0>; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0x8000 0x8000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0x8000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + sdh1_edge_wakeup: pinmux-sdh1-edge-wakeup { + pinctrl-single,pins = <0x178 1>; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0x8000 0x8000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0x8000 0 0xa000>; + pinctrl-single,input-schmitt = <0x30 0x30>; + pinctrl-single,input-schmitt-enable = <0 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + sdh1_pins_1_fast: pinmux-sdh1-1-fast { + pinctrl-single,pins = < + 0x170 1 + 0x174 1 + 0x178 1 + 0x17c 1 + 0x180 1 + >; + pinctrl-single,drive-strength = <0x1800 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + sdh1_pins_2_fast: pinmux-sdh1-2-fast { + pinctrl-single,pins = < + 0x184 1 + >; + pinctrl-single,drive-strength = <0x1800 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0x208 0x388>; + }; }; &uart0 { @@ -316,7 +394,7 @@ pmic0: 88pm886@30 { compatible = "marvell,88pm886"; reg = <0x30>; - interrupts = <0 4 IRQF_TRIGGER_HIGH>; + interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&gic>; interrupt-controller; #interrupt-cells = <1>; @@ -385,5 +463,37 @@ bus-width = <4>; wp-inverted; }; + +&sdh1 { + status = "okay"; + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&sdh1_pins_1 &sdh1_pins_2 &sdh1_pins_3>; + pinctrl-1 = <&sdh1_pins_1_fast &sdh1_pins_2_fast &sdh1_pins_3>; + pinctrl-2 = <&sdh1_edge_wakeup>; + bus-width = <4>; + max-frequency = <200000000>; + cap-sd-highspeed; + sd-uhs-sdr50; + sd-uhs-sdr104; + keep-power-in-suspend; + wakeup-source; + cap-sdio-irq; + vmmc-supply = <&ldo15>; + vqmmc-supply = <&buck2>; + mmc-pwrseq = <&wlan_pwrseq>; + non-removable; + cap-power-off-card; + + #address-cells = <1>; + #size-cells = <0>; + + mwifiex: mwifiex@1 { + compatible = "marvell,sd8777"; + reg = <1>; + interrupt-parent = <&gpio>; + interrupts = <38 IRQ_TYPE_LEVEL_LOW>; + marvell,wakeup-pin = <3>; + }; +}; #include "88pm886.dtsi" #include "88pm88x.dtsi" -- 2.39.5