From b436174f7e2aca24e992c30d9768a67285f63bb4 Mon Sep 17 00:00:00 2001 From: Sunny Luo Date: Mon, 19 Mar 2018 11:37:07 +0800 Subject: [PATCH] dts: spicc: add node for g12a_s905d2 skt. PD#162464: dts: spicc: add node for g12a_s905d2 skt kernel4.9 still use the amlogic driver. DTS compatible name should be "spicc" but not "meson-g12a-spicc" to avoid probing the upstream driver. Change-Id: I0465f71f1504929a459ae1d912cc4bb1f397ccde Signed-off-by: Sunny Luo --- .../boot/dts/amlogic/g12a_s905d2_skt.dts | 16 ++++++ .../dts/amlogic/g12a_s905d2_skt_buildroot.dts | 16 ++++++ arch/arm64/boot/dts/amlogic/mesong12a.dtsi | 57 +++++++++++++++++++ 3 files changed, 89 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/g12a_s905d2_skt.dts b/arch/arm64/boot/dts/amlogic/g12a_s905d2_skt.dts index d18b67a9d2b9..891eed92a684 100644 --- a/arch/arm64/boot/dts/amlogic/g12a_s905d2_skt.dts +++ b/arch/arm64/boot/dts/amlogic/g12a_s905d2_skt.dts @@ -1057,6 +1057,22 @@ /* Audio Related End */ +&spicc0 { + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&spicc0_pins_x>; + cs-gpios = <&gpio GPIOX_10 0>; + num_chipselect = <1>; +}; + +&spicc1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spicc1_pins>; + cs-gpios = <&gpio GPIOH_6 0>; + num_chipselect = <1>; +}; + &pwm_ef { status = "okay"; }; diff --git a/arch/arm64/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts b/arch/arm64/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts index 7659f4ba9e6a..82fd333aef62 100644 --- a/arch/arm64/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts +++ b/arch/arm64/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts @@ -990,6 +990,22 @@ /* Audio Related End */ +&spicc0 { + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&spicc0_pins_x>; + cs-gpios = <&gpio GPIOX_10 0>; + num_chipselect = <1>; +}; + +&spicc1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spicc1_pins>; + cs-gpios = <&gpio GPIOH_6 0>; + num_chipselect = <1>; +}; + &pwm_ef { status = "okay"; }; diff --git a/arch/arm64/boot/dts/amlogic/mesong12a.dtsi b/arch/arm64/boot/dts/amlogic/mesong12a.dtsi index 4983994f5f12..b8b366df61f9 100644 --- a/arch/arm64/boot/dts/amlogic/mesong12a.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesong12a.dtsi @@ -584,6 +584,43 @@ clock-names = "clk_i2c"; }; + spicc0: spi@13000 { + compatible = "amlogic, spicc"; + reg = <0x0 0x13000 0x0 0x40>; + interrupts = ; + clock-names = "spicc_clk"; + clocks = <&clkc CLKID_SPICC0_COMP>; + clk_rate = <666666666>; + device_id = <0>; + enhance = <1>; + ssctl = <0>; + dma_tx_threshold = <3>; + dma_num_per_read_burst = <13>; + dma_auto_param = <1>; + delay_control = <0x15>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spicc1: spi@15000 { + compatible = "amlogic, spicc"; + reg = <0x0 0x15000 0x0 0x40>; + interrupts = ; + clock-names = "spicc_clk"; + clocks = <&clkc CLKID_SPICC1_COMP>; + clk_rate = <666666666>; + device_id = <1>; + enhance = <1>; + ssctl = <0>; + dma_tx_threshold = <3>; + dma_num_per_read_burst = <13>; + dma_auto_param = <1>; + delay_control = <0x15>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; }; /* end of cbus */ aobus: aobus@ff800000 { @@ -1954,6 +1991,26 @@ }; }; + spicc0_pins_x: spicc0_pins_x { + mux { + groups = "spi0_mosi_x", + "spi0_miso_x", + //"spi0_ss0_x", + "spi0_clk_x"; + function = "spi0"; + }; + }; + + spicc1_pins: spicc1_pins { + mux { + groups = "spi1_mosi", + "spi1_miso", + //"spi1_ss0", + "spi1_clk"; + function = "spi1"; + }; + }; + a_uart_pins:a_uart { mux { groups = "uart_tx_a",