diff options
| -rw-r--r-- | arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 215 | ||||
| -rw-r--r-- | arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 482 | ||||
| -rw-r--r-- | arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts | 15 | ||||
| -rw-r--r-- | arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts | 81 | ||||
| -rw-r--r-- | arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 45 |
5 files changed, 838 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts index f4c953034be39..c41525a34b721 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts @@ -6,6 +6,8 @@ /dts-v1/; #include "amlogic-t7.dtsi" +#include <dt-bindings/gpio/amlogic,t7-periphs-pinctrl.h> +#include <dt-bindings/gpio/gpio.h> / { model = "Khadas VIM4"; @@ -13,6 +15,9 @@ aliases { serial0 = &uart_a; + mmc0 = &sd_emmc_c; + mmc1 = &sd_emmc_b; + mmc2 = &sd_emmc_a; }; memory@0 { @@ -40,13 +45,223 @@ }; }; + dc_in: regulator-dc-in { + compatible = "regulator-fixed"; + regulator-name = "DC_IN"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + pwm-leds { + compatible = "pwm-leds"; + + status { + linux,default-trigger="heartbeat"; + max-brightness = <255>; + pwms = <&pwm_ao_cd 0 30040 0>; + }; + }; + + sd_3v3: regulator-sdcard-3v3 { + compatible = "regulator-fixed"; + regulator-name = "SD_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vddao_3v3>; + gpio = <&gpio GPIOD_11 GPIO_ACTIVE_LOW>; + regulator-boot-on; + regulator-always-on; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; + post-power-on-delay-ms = <500>; + power-off-delay-us = <200000>; + clocks = <&wifi32k>; + clock-names = "ext_clock"; + }; + + vcc5v: regulator-vcc-5v { + compatible = "regulator-fixed"; + regulator-name = "VCC5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&dc_in>; + + gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vcc5v0_usb: regulator-vcc-usb { + compatible = "regulator-fixed"; + regulator-name = "VCC5V0_USB"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc5v>; + + gpio = <&gpio GPIOY_5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vddao_1v8: regulator-vddao-1v8 { + compatible = "regulator-fixed"; + regulator-name = "VDDAO_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vddao_3v3>; + regulator-always-on; + }; + + vddao_3v3: regulator-vddao-3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDDAO_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&dc_in>; + regulator-always-on; + }; + + vddio_1v8: regulator-vddio-1v8 { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vddio_3v3>; + regulator-always-on; + }; + + vddio_3v3: regulator-vddio-3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vddao_3v3>; + regulator-always-on; + }; + + vddio_c: regulator-gpio-c { + compatible = "regulator-gpio"; + regulator-name = "VDDIO_C"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vddio_3v3>; + gpios = <&gpio GPIOD_9 GPIO_ACTIVE_HIGH>; + states = <1800000 1 + 3300000 0>; + }; + + wifi32k: wifi32k { + compatible = "pwm-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + pwms = <&pwm_ab 0 30518 0>; + }; + xtal: xtal-clk { compatible = "fixed-clock"; clock-frequency = <24000000>; clock-output-names = "xtal"; #clock-cells = <0>; }; +}; + +&pwm_ab { + status = "okay"; + pinctrl-0 = <&pwm_a_pins>; + pinctrl-names = "default"; +}; + +&pwm_ao_cd { + status = "okay"; + pinctrl-0 = <&pwm_ao_c_d_pins>; + pinctrl-names = "default"; +}; + +/* SDIO */ +&sd_emmc_a { + status = "okay"; + pinctrl-0 = <&sdio_pins>; + pinctrl-1 = <&sdio_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + #address-cells = <1>; + #size-cells = <0>; + + bus-width = <4>; + cap-sd-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + sd-uhs-sdr104; + cap-sdio-irq; + max-frequency = <200000000>; + non-removable; + disable-wp; + no-mmc; + no-sd; + + power-domains = <&pwrc PWRC_T7_SDIO_A_ID>; + + keep-power-in-suspend; + + mmc-pwrseq = <&sdio_pwrseq>; + + vmmc-supply = <&vddao_3v3>; + vqmmc-supply = <&vddao_1v8>; + + brcmf: wifi@1 { + reg = <1>; + compatible = "brcm,bcm43752-fmac", "brcm,bcm4329-fmac"; + }; +}; + +/* SD card */ +&sd_emmc_b { + status = "okay"; + pinctrl-0 = <&sdcard_pins>; + pinctrl-1 = <&sdcard_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <4>; + cap-sd-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + sd-uhs-sdr104; + max-frequency = <200000000>; + disable-wp; + no-sdio; + no-mmc; + + power-domains = <&pwrc PWRC_T7_SDIO_B_ID>; + + cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; + vmmc-supply = <&sd_3v3>; + vqmmc-supply = <&vddio_c>; +}; + +/* eMMC */ +&sd_emmc_c { + status = "okay"; + pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; + pinctrl-1 = <&emmc_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <8>; + cap-mmc-highspeed; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + max-frequency = <200000000>; + disable-wp; + non-removable; + no-sdio; + no-sd; + + power-domains = <&pwrc PWRC_T7_EMMC_ID>; + vmmc-supply = <&vddio_3v3>; + vqmmc-supply = <&vddio_1v8>; }; &uart_a { diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi index d523cbc0ed22a..cc371fcd18967 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi @@ -6,6 +6,9 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/power/amlogic,t7-pwrc.h> #include "amlogic-t7-reset.h" +#include <dt-bindings/clock/amlogic,t7-scmi.h> +#include <dt-bindings/clock/amlogic,t7-pll-clkc.h> +#include <dt-bindings/clock/amlogic,t7-peripherals-clkc.h> / { interrupt-parent = <&gic>; @@ -201,6 +204,34 @@ }; }; + sram@f7042000 { + compatible = "mmio-sram"; + reg = <0x0 0xf7042000 0x0 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x0 0xf7042000 0x100>; + + scmi_shmem: sram@0 { + compatible = "arm,scmi-shmem"; + reg = <0x0 0x100>; + }; + }; + + firmware { + scmi: scmi { + compatible = "arm,scmi-smc"; + arm,smc-id = <0x820000c1>; + shmem = <&scmi_shmem>; + #address-cells = <1>; + #size-cells = <0>; + + scmi_clk: protocol@14 { + reg = <0x14>; + #clock-cells = <1>; + }; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <2>; @@ -226,6 +257,42 @@ #size-cells = <2>; ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>; + clkc_periphs: clock-controller@0 { + compatible = "amlogic,t7-peripherals-clkc"; + reg = <0x0 0x0 0x0 0x1c8>; + #clock-cells = <1>; + clocks = <&xtal>, + <&scmi_clk CLKID_SYS_CLK>, + <&scmi_clk CLKID_FIXED_PLL>, + <&scmi_clk CLKID_FCLK_DIV2>, + <&scmi_clk CLKID_FCLK_DIV2P5>, + <&scmi_clk CLKID_FCLK_DIV3>, + <&scmi_clk CLKID_FCLK_DIV4>, + <&scmi_clk CLKID_FCLK_DIV5>, + <&scmi_clk CLKID_FCLK_DIV7>, + <&hifi CLKID_HIFI_PLL>, + <&gp0 CLKID_GP0_PLL>, + <&gp1 CLKID_GP1_PLL>, + <&mpll CLKID_MPLL1>, + <&mpll CLKID_MPLL2>, + <&mpll CLKID_MPLL3>; + clock-names = "xtal", + "sys", + "fix", + "fdiv2", + "fdiv2p5", + "fdiv3", + "fdiv4", + "fdiv5", + "fdiv7", + "hifi", + "gp0", + "gp1", + "mpll1", + "mpll2", + "mpll3"; + }; + reset: reset-controller@2000 { compatible = "amlogic,t7-reset"; reg = <0x0 0x2000 0x0 0x98>; @@ -252,6 +319,258 @@ #gpio-cells = <2>; gpio-ranges = <&periphs_pinctrl 0 0 157>; }; + + emmc_ctrl_pins: emmc-ctrl { + mux-0 { + groups = "emmc_cmd"; + function = "emmc"; + bias-pull-up; + }; + + mux-1 { + groups = "emmc_clk"; + function = "emmc"; + bias-disable; + }; + }; + + emmc_data_4b_pins: emmc-data-4b { + mux { + groups = "emmc_nand_d0", + "emmc_nand_d1", + "emmc_nand_d2", + "emmc_nand_d3"; + function = "emmc"; + bias-pull-up; + }; + }; + + emmc_data_8b_pins: emmc-data-8b { + mux { + groups = "emmc_nand_d0", + "emmc_nand_d1", + "emmc_nand_d2", + "emmc_nand_d3", + "emmc_nand_d4", + "emmc_nand_d5", + "emmc_nand_d6", + "emmc_nand_d7"; + function = "emmc"; + bias-pull-up; + }; + }; + + emmc_ds_pins: emmc-ds { + mux { + groups = "emmc_nand_ds"; + function = "emmc"; + bias-pull-down; + }; + }; + + emmc_clk_gate_pins: emmc-clk-gate { + mux { + groups = "GPIOB_8"; + function = "gpio_periphs"; + bias-pull-down; + }; + }; + + i2c0_ao_d_pins: i2c0-ao-d { + mux { + groups = "i2c0_ao_sck_d", + "i2c0_ao_sda_d"; + function = "i2c0_ao"; + bias-disable; + drive-strength-microamp = <3000>; + }; + }; + + pwm_a_pins: pwm-a { + mux { + groups = "pwm_a"; + function = "pwm_a"; + bias-disable; + }; + }; + + pwm_ao_a_pins: pwm-ao-a { + mux { + groups = "pwm_ao_a"; + function = "pwm_ao_a"; + bias-disable; + }; + }; + + pwm_ao_b_pins: pwm-ao-b { + mux { + groups = "pwm_ao_b"; + function = "pwm_ao_b"; + bias-disable; + }; + }; + + pwm_ao_c_d_pins: pwm-ao-c-d { + mux { + groups = "pwm_ao_c_d"; + function = "pwm_ao_c"; + bias-disable; + }; + }; + + pwm_ao_c_e_pins: pwm-ao-c-e { + mux { + groups = "pwm_ao_c_e"; + function = "pwm_ao_c"; + bias-disable; + }; + }; + + pwm_ao_c_hiz_pins: pwm-ao-c-hiz { + mux { + groups = "pwm_ao_c_hiz"; + function = "pwm_ao_c_hiz"; + bias-disable; + }; + }; + + pwm_ao_d_pins: pwm-ao-d { + mux { + groups = "pwm_ao_d"; + function = "pwm_ao_d"; + bias-disable; + }; + }; + + pwm_ao_e_pins: pwm-ao-e { + mux { + groups = "pwm_ao_e"; + function = "pwm_ao_e"; + bias-disable; + }; + }; + + pwm_ao_f_pins: pwm-ao-f { + mux { + groups = "pwm_ao_f"; + function = "pwm_ao_f"; + bias-disable; + }; + }; + + pwm_ao_g_pins: pwm-ao-g { + mux { + groups = "pwm_ao_g"; + function = "pwm_ao_g"; + bias-disable; + }; + }; + + pwm_ao_g_hiz_pins: pwm-ao-g-hiz { + mux { + groups = "pwm_ao_g_hiz"; + function = "pwm_ao_g_hiz"; + bias-disable; + }; + }; + + pwm_ao_h_pins: pwm-ao-h { + mux { + groups = "pwm_ao_h"; + function = "pwm_ao_h"; + bias-disable; + }; + }; + + pwm_b_pins: pwm-b { + mux { + groups = "pwm_b"; + function = "pwm_b"; + bias-disable; + }; + }; + + pwm_c_pins: pwm-c { + mux { + groups = "pwm_c"; + function = "pwm_c"; + bias-disable; + }; + }; + + pwm_d_pins: pwm-d { + mux { + groups = "pwm_d"; + function = "pwm_d"; + bias-disable; + }; + }; + + pwm_e_pins: pwm-e { + mux { + groups = "pwm_e"; + function = "pwm_e"; + bias-disable; + }; + }; + + pwm_f_pins: pwm-f { + mux { + groups = "pwm_f"; + function = "pwm_f"; + bias-disable; + }; + }; + + pwm_vs_pins: pwm-vs { + mux { + groups = "pwm_vs"; + function = "pwm_vs"; + bias-disable; + }; + }; + + sdcard_pins: sdcard { + mux { + groups = "sdcard_d0", + "sdcard_d1", + "sdcard_d2", + "sdcard_d3", + "sdcard_clk", + "sdcard_cmd"; + function = "sdcard"; + bias-pull-up; + }; + }; + + sdcard_clk_gate_pins: sdcard-clk-gate { + mux { + groups = "GPIOC_4"; + function = "gpio_periphs"; + bias-pull-down; + }; + }; + + sdio_pins: sdio { + mux { + groups = "sdio_d0", + "sdio_d1", + "sdio_d2", + "sdio_d3", + "sdio_clk", + "sdio_cmd"; + function = "sdio"; + bias-pull-up; + }; + }; + + sdio_clk_gate_pins: sdio-clk-gate { + mux { + groups = "GPIOX_4"; + function = "gpio_periphs"; + bias-pull-up; + }; + }; }; gpio_intc: interrupt-controller@4080 { @@ -271,6 +590,64 @@ status = "disabled"; }; + gp0: clock-controller@8080 { + compatible = "amlogic,t7-gp0-pll"; + reg = <0x0 0x8080 0x0 0x20>; + clocks = <&scmi_clk CLKID_TOP_PLL_OSC>; + clock-names = "in0"; + #clock-cells = <1>; + }; + + gp1: clock-controller@80c0 { + compatible = "amlogic,t7-gp1-pll"; + reg = <0x0 0x80c0 0x0 0x14>; + clocks = <&scmi_clk CLKID_TOP_PLL_OSC>; + clock-names = "in0"; + #clock-cells = <1>; + }; + + hifi: clock-controller@8100 { + compatible = "amlogic,t7-hifi-pll"; + reg = <0x0 0x8100 0x0 0x20>; + clocks = <&scmi_clk CLKID_TOP_PLL_OSC>; + clock-names = "in0"; + #clock-cells = <1>; + }; + + pcie: clock-controller@8140 { + compatible = "amlogic,t7-pcie-pll"; + reg = <0x0 0x8140 0x0 0x1c>; + clocks = <&scmi_clk CLKID_PCIE_OSC>; + clock-names = "in0"; + #clock-cells = <1>; + }; + + mpll: clock-controller@8180 { + compatible = "amlogic,t7-mpll"; + reg = <0x0 0x8180 0x0 0x28>; + clocks = <&scmi_clk CLKID_FIXED_PLL_DCO>; + clock-names = "in0"; + #clock-cells = <1>; + }; + + hdmi: clock-controller@81c0 { + compatible = "amlogic,t7-hdmi-pll"; + reg = <0x0 0x81c0 0x0 0x20>; + clocks = <&scmi_clk CLKID_HDMI_PLL_OSC>; + clock-names = "in0"; + #clock-cells = <1>; + }; + + mclk: clock-controller@8300 { + compatible = "amlogic,t7-mclk-pll"; + reg = <0x0 0x8300 0x0 0x18>; + clocks = <&scmi_clk CLKID_MCLK_PLL_OSC>, + <&xtal>, + <&scmi_clk CLKID_FCLK_50M>; + clock-names = "in0", "in1", "in2"; + #clock-cells = <1>; + }; + sec_ao: ao-secure@10220 { compatible = "amlogic,t7-ao-secure", "amlogic,meson-gx-ao-secure", @@ -278,6 +655,111 @@ reg = <0x0 0x10220 0x0 0x140>; amlogic,has-chip-id; }; + + pwm_ao_ef: pwm@30000 { + compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm"; + reg = <0x0 0x30000 0x0 0x24>; + clocks = <&clkc_periphs CLKID_PWM_AO_E>, + <&clkc_periphs CLKID_PWM_AO_F>; + #pwm-cells = <3>; + status = "disabled"; + }; + + pwm_ao_gh: pwm@32000 { + compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm"; + reg = <0x0 0x32000 0x0 0x24>; + clocks = <&clkc_periphs CLKID_PWM_AO_G>, + <&clkc_periphs CLKID_PWM_AO_H>; + #pwm-cells = <3>; + status = "disabled"; + }; + + pwm_ab: pwm@58000 { + compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm"; + reg = <0x0 0x58000 0x0 0x24>; + clocks = <&clkc_periphs CLKID_PWM_A>, + <&clkc_periphs CLKID_PWM_B>; + #pwm-cells = <3>; + status = "disabled"; + }; + + pwm_cd: pwm@5a000 { + compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm"; + reg = <0x0 0x5a000 0x0 0x24>; + clocks = <&clkc_periphs CLKID_PWM_C>, + <&clkc_periphs CLKID_PWM_D>; + #pwm-cells = <3>; + status = "disabled"; + }; + + pwm_ef: pwm@5c000 { + compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm"; + reg = <0x0 0x5c000 0x0 0x24>; + clocks = <&clkc_periphs CLKID_PWM_E>, + <&clkc_periphs CLKID_PWM_F>; + #pwm-cells = <3>; + status = "disabled"; + }; + + pwm_ao_ab: pwm@5e000 { + compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm"; + reg = <0x0 0x5e000 0x0 0x24>; + clocks = <&clkc_periphs CLKID_PWM_AO_A>, + <&clkc_periphs CLKID_PWM_AO_B>; + #pwm-cells = <3>; + status = "disabled"; + }; + + pwm_ao_cd: pwm@60000 { + compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm"; + reg = <0x0 0x60000 0x0 0x24>; + clocks = <&clkc_periphs CLKID_PWM_AO_C>, + <&clkc_periphs CLKID_PWM_AO_D>; + #pwm-cells = <3>; + status = "disabled"; + }; + + sd_emmc_a: mmc@88000 { + compatible = "amlogic,t7-mmc", "amlogic,meson-axg-mmc"; + reg = <0x0 0x88000 0x0 0x800>; + interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clkc_periphs CLKID_SYS_SD_EMMC_A>, + <&clkc_periphs CLKID_SD_EMMC_A>, + <&scmi_clk CLKID_FCLK_DIV2>; + clock-names = "core", "clkin0", "clkin1"; + resets = <&reset RESET_SD_EMMC_A>; + assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_A_SEL>; + assigned-clock-parents = <&xtal>; + status = "disabled"; + }; + + sd_emmc_b: mmc@8a000 { + compatible = "amlogic,t7-mmc", "amlogic,meson-axg-mmc"; + reg = <0x0 0x8a000 0x0 0x800>; + interrupts = <GIC_SPI 177 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_periphs CLKID_SYS_SD_EMMC_B>, + <&clkc_periphs CLKID_SD_EMMC_B>, + <&scmi_clk CLKID_FCLK_DIV2>; + clock-names = "core", "clkin0", "clkin1"; + resets = <&reset RESET_SD_EMMC_B>; + assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_B_SEL>; + assigned-clock-parents = <&xtal>; + status = "disabled"; + }; + + sd_emmc_c: mmc@8c000 { + compatible = "amlogic,t7-mmc", "amlogic,meson-axg-mmc"; + reg = <0x0 0x8c000 0x0 0x800>; + interrupts = <GIC_SPI 178 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_periphs CLKID_SYS_SD_EMMC_C>, + <&clkc_periphs CLKID_SD_EMMC_C>, + <&scmi_clk CLKID_FCLK_DIV2>; + clock-names = "core", "clkin0", "clkin1"; + resets = <&reset RESET_SD_EMMC_C>; + assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_C_SEL>; + assigned-clock-parents = <&xtal>; + status = "disabled"; + }; }; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts index 393d3cb33b9ee..dea3a60e8527d 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts @@ -30,6 +30,21 @@ status = "disabled"; }; +&uart_A { + status = "okay"; + pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; + max-speed = <2000000>; + clocks = <&wifi32k>; + clock-names = "lpo"; + }; +}; + &usb { dr_mode = "host"; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts b/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts index 27d0f6134ea9d..99d5df71b9cd4 100644 --- a/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts +++ b/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts @@ -6,6 +6,8 @@ /dts-v1/; #include "meson-s4.dtsi" +#include <dt-bindings/input/input.h> +#include <dt-bindings/leds/common.h> / { model = "Khadas VIM1S"; @@ -18,6 +20,8 @@ mmc0 = &emmc; /* eMMC */ mmc1 = &sd; /* SD card */ mmc2 = &sdio; /* SDIO */ + rtc0 = &rtc; + rtc1 = &vrtc; serial0 = &uart_b; }; @@ -38,11 +42,48 @@ }; }; + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1710000>; + poll-interval = <100>; + + button-function { + label = "Function"; + linux,code = <KEY_FN>; + press-threshold-microvolt = <10000>; + }; + }; + emmc_pwrseq: emmc-pwrseq { compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio GPIOB_9 GPIO_ACTIVE_LOW>; }; + gpio-keys-polled { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + power-button { + label = "power"; + linux,code = <KEY_POWER>; + gpios = <&gpio GPIOD_8 GPIO_ACTIVE_LOW>; + }; + }; + + pwm-leds { + compatible = "pwm-leds"; + + led-1 { + color = <LED_COLOR_ID_WHITE>; + function = LED_FUNCTION_STATUS; + linux,default-trigger = "heartbeat"; + max-brightness = <255>; + pwms = <&pwm_gh 0 30040 0>; + }; + }; + sdio_32k: sdio-32k { compatible = "pwm-clock"; #clock-cells = <0>; @@ -184,10 +225,24 @@ phy-mode = "rmii"; }; +&i2c1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins2>; + clock-frequency = <100000>; + + rtc: rtc@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0>; + }; +}; + &ir { status = "okay"; pinctrl-0 = <&remote_pins>; pinctrl-names = "default"; + linux,rc-map-name = "rc-khadas"; }; &pwm_ef { @@ -196,6 +251,12 @@ pinctrl-names = "default"; }; +&pwm_gh { + status = "okay"; + pinctrl-0 = <&pwm_g_pins1>; + pinctrl-names = "default"; +}; + &pwm_ij { status = "okay"; }; @@ -247,6 +308,11 @@ }; }; +&saradc { + status = "okay"; + vref-supply = <&vddio_ao1v8>; +}; + &spicc0 { status = "okay"; pinctrl-names = "default"; @@ -254,6 +320,21 @@ cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>; }; +&uart_a { + status = "okay"; + pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; + + bluetooth { + compatible = "brcm,bcm4345c5"; + shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; + max-speed = <2000000>; + clocks = <&sdio_32k>; + clock-names = "lpo"; + }; +}; + &uart_b { status = "okay"; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi index dfc0a30a6e61b..2a6fbd5308362 100644 --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi @@ -59,6 +59,11 @@ method = "smc"; }; + vrtc: rtc@fe010288 { + compatible = "amlogic,meson-vrtc"; + reg = <0x0 0xfe010288 0x0 0x4>; + }; + xtal: xtal-clk { compatible = "fixed-clock"; clock-frequency = <24000000>; @@ -77,6 +82,20 @@ }; }; + saradc: adc@fe026000 { + compatible = "amlogic,meson-s4-saradc", + "amlogic,meson-g12a-saradc"; + reg = <0x0 0xfe026000 0x0 0x48>; + #io-channel-cells = <1>; + interrupts = <GIC_SPI 181 IRQ_TYPE_EDGE_RISING>; + clocks = <&xtal>, + <&clkc_periphs CLKID_SAR_ADC>, + <&clkc_periphs CLKID_SARADC>, + <&clkc_periphs CLKID_SARADC_SEL>; + clock-names = "clkin", "core", "adc_clk", "adc_sel"; + status = "disabled"; + }; + soc { compatible = "simple-bus"; #address-cells = <2>; @@ -163,6 +182,22 @@ }; }; + uart_a_pins: uart-a-pins { + mux { + groups = "uart_a_tx", + "uart_a_rx"; + function = "uart_a"; + }; + }; + + uart_a_cts_rts_pins: uart-a-cts-rts-pins { + mux { + groups = "uart_a_cts", + "uart_a_rts"; + function = "uart_a"; + }; + }; + i2c0_pins1: i2c0-pins1 { mux { groups = "i2c0_sda", @@ -814,6 +849,16 @@ }; }; + uart_a: serial@fe078000 { + compatible = "amlogic,meson-s4-uart", + "amlogic,meson-ao-uart"; + reg = <0x0 0xfe078000 0x0 0x18>; + interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>; + clocks = <&xtal>, <&clkc_periphs CLKID_UART_A>, <&xtal>; + clock-names = "xtal", "pclk", "baud"; + status = "disabled"; + }; + sdio: mmc@fe088000 { compatible = "amlogic,meson-axg-mmc"; reg = <0x0 0xfe088000 0x0 0x800>; |
