ARM64: dts: meson-gxbb: Add MMC and Wifi support
Subsystems (2)
cover ARM64: dts: meson-gxbb: Add MMC and Wifi support
This patchsets adds the MMC nodes in the GX dtsi and adds the GXBB clocks attributes in the GXBB dtsi.
Then MMC/SD/SDIO support is added to :
- p20x : SD, SDIO, MMC
- a95x : SD, SDIO, MMC
- Odroid-C2 : SD, MMC
WiFi support is also added by enabling the 32768Hz clock generated by PWM on p20x and A95x and adding the SDIO power sequence.
This patchset is based on Kevin Hilman's amlogic v4.10/dt64 tree at [1]
[1] git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic.git
Kevin Hilman (1):
ARM64: dts: meson-gxbb: add MMC support
Neil Armstrong (3):
ARM64: dts: meson-gxbb: Add Wifi 32K clock for p20x boards
ARM64: dts: meson-gxbb: Add P20x Wifi SDIO support
ARM64: dts: meson-gxbb: Add MMC nodes to Nexbox A95x
arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 21 ++++ .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 122 ++++++++++++++++++++ .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 88 ++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 127 +++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 24 +++- 5 files changed, 381 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
PATCH 1/4 ARM64: dts: meson-gxbb: add MMC support
From: Kevin Hilman <[email protected]>
Add binding and basic support for the SD/eMMC controller on Amlogic S905/GXBB devices.
--- arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 21 +++++ .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 88 +++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 98 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 24 +++++- 4 files changed, 230 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gx.dtsi +21 -0
@@ -203,6 +203,27 @@ #address-cells = <2>; #size-cells = <2>; ranges = <0x0 0x0 0x0 0xd0000000 0x0 0x200000>; + + sd_emmc_a: mmc at 70000 { + compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; + reg = <0x0 0x70000 0x0 0x2000>; + interrupts = <GIC_SPI 216 IRQ_TYPE_EDGE_RISING>; + status = "disabled"; + }; + + sd_emmc_b: mmc at 72000 { + compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; + reg = <0x0 0x72000 0x0 0x2000>; + interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>; + status = "disabled"; + }; + + sd_emmc_c: mmc at 74000 { + compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; + reg = <0x0 0x74000 0x0 0x2000>; + interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>; + status = "disabled"; + }; }; }; };
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +88 -0
97 lines not on this page · raw message
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi +98 -0
107 lines not on this page · raw message
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +23 -1
@@ -349,7 +349,8 @@ mux { groups = "emmc_nand_d07", "emmc_cmd", - "emmc_clk"; + "emmc_clk", + "emmc_ds"; function = "emmc"; }; };
@@ -545,3 +546,24 @@ #mbox-cells = <1>; }; }; + +&sd_emmc_a { + clocks = <&clkc CLKID_SD_EMMC_A>, + <&xtal>, + <&clkc CLKID_FCLK_DIV2>; + clock-names = "core", "clkin0", "clkin1"; +}; + +&sd_emmc_b { + clocks = <&clkc CLKID_SD_EMMC_B>, + <&xtal>, + <&clkc CLKID_FCLK_DIV2>; + clock-names = "core", "clkin0", "clkin1"; +}; + +&sd_emmc_c { + clocks = <&clkc CLKID_SD_EMMC_C>, + <&xtal>, + <&clkc CLKID_FCLK_DIV2>; + clock-names = "core", "clkin0", "clkin1"; +};
Signature · 1 line
1.9.1
Re: [PATCH 1/4] ARM64: dts: meson-gxbb: add MMC support
Quoted 7 lines · Neil Armstrong
From: Kevin Hilman <[email protected]>
Add binding and basic support for the SD/eMMC controller on Amlogic S905/GXBB devices.
Acked-by Rob Herring <[email protected]>Signed-off-by Kevin Hilman <[email protected]>
nit: you added a couple things from my original patch, and it's customary to make a summary note of changes in the changelog, so before applying, I added a line here:
[narmstrong: added nodes for GX, enabled SDIO on P20x]
Quoted 1 line
Signed-off-by Neil Armstrong <[email protected]>
Applied to v4.10/dt64
Kevin
PATCH 2/4 ARM64: dts: meson-gxbb: Add Wifi 32K clock for p20x boards
In reply to Neil ArmstrongAdd a 32768Hz clock generated by the PWM E port used by the WiFi module.
--- arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi +15 -0
@@ -111,6 +111,13 @@ compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; }; + + wifi32k: wifi32k { + compatible = "pwm-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ + }; }; /* This UART is brought out to the DB9 connector */
@@ -205,3 +212,11 @@ vmmc-supply = <&vcc_3v3>; vqmmc-supply = <&vddio_boot>; }; + +&pwm_ef { + status = "okay"; + pinctrl-0 = <&pwm_e_pins>; + pinctrl-names = "default"; + clocks = <&clkc CLKID_FCLK_DIV4>; + clock-names = "clkin0"; +};
Signature · 1 line
1.9.1
PATCH 3/4 ARM64: dts: meson-gxbb: Add P20x Wifi SDIO support
In reply to Neil ArmstrongAdd Wifi module support on the Amlogic P20x boards on the SDIO port. The Wifi module also needs a 32768Hz clock provided by the PWM E port through a pwm-clock node in it's power sequence.
--- arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi +14 -0
@@ -118,6 +118,13 @@ clock-frequency = <32768>; pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; + clocks = <&wifi32k>; + clock-names = "ext_clock"; + }; }; /* This UART is brought out to the DB9 connector */
@@ -171,8 +178,15 @@ non-removable; disable-wp; + mmc-pwrseq = <&sdio_pwrseq>; + vmmc-supply = <&vddao_3v3>; vqmmc-supply = <&vddio_boot>; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; }; /* SD card */
Signature · 1 line
1.9.1
PATCH 4/4 ARM64: dts: meson-gxbb: Add MMC nodes to Nexbox A95x
In reply to Neil ArmstrongAdd support for eMMC/SD/SDIO on the Nexbox A95x.
--- .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts +122 -0
@@ -87,6 +87,61 @@ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>; }; }; + + vddio_card: gpio-regulator { + compatible = "regulator-gpio"; + + regulator-name = "VDDIO_CARD"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + + /* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */ + states = <1800000 0 + 3300000 1>; + }; + + vddio_boot: regulator-vddio_boot { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_BOOT"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vddao_3v3: regulator-vddao_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDDAO_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vcc_3v3: regulator-vcc_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VCC_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + emmc_pwrseq: emmc-pwrseq { + compatible = "mmc-pwrseq-emmc"; + reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; + }; + + wifi32k: wifi32k { + compatible = "pwm-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; + clocks = <&wifi32k>; + clock-names = "ext_clock"; + }; }; &uart_AO {
@@ -107,3 +162,70 @@ pinctrl-0 = <&remote_input_ao_pins>; pinctrl-names = "default"; }; + +/* Wireless SDIO Module */ +&sd_emmc_a { + status = "okay"; + pinctrl-0 = <&sdio_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + + bus-width = <4>; + cap-sd-highspeed; + max-frequency = <100000000>; + + non-removable; + disable-wp; + + mmc-pwrseq = <&sdio_pwrseq>; + + vmmc-supply = <&vddao_3v3>; + vqmmc-supply = <&vddio_boot>; +}; + +/* SD card */ +&sd_emmc_b { + status = "okay"; + pinctrl-0 = <&sdcard_pins>; + pinctrl-names = "default"; + + bus-width = <4>; + cap-sd-highspeed; + max-frequency = <100000000>; + disable-wp; + + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; + cd-inverted; + + vmmc-supply = <&vddao_3v3>; + vqmmc-supply = <&vddio_card>; +}; + +/* eMMC */ +&sd_emmc_c { + status = "okay"; + pinctrl-0 = <&emmc_pins>; + pinctrl-names = "default"; + + bus-width = <8>; + cap-sd-highspeed; + cap-mmc-highspeed; + max-frequency = <200000000>; + non-removable; + disable-wp; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + + mmc-pwrseq = <&emmc_pwrseq>; + vmmc-supply = <&vcc_3v3>; + vqmmc-supply = <&vddio_boot>; +}; + +&pwm_ef { + status = "okay"; + pinctrl-0 = <&pwm_e_pins>; + pinctrl-names = "default"; + clocks = <&clkc CLKID_FCLK_DIV4>; + clock-names = "clkin0"; +};
Signature · 1 line
1.9.1