From 6285e25ae4342a25d17ef033f210433d746cfdb9 Mon Sep 17 00:00:00 2001 From: femto Date: Tue, 10 Dec 2019 11:06:15 +0900 Subject: [PATCH] ODROID-C4: Enable spicc for rev_0.4 Signed-off-by: femto Change-Id: I297dc577f7091f796dfd80cbf6be78baf1ae79ca --- .../boot/dts/amlogic/meson64_odroidc4.dts | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson64_odroidc4.dts b/arch/arm64/boot/dts/amlogic/meson64_odroidc4.dts index 35f9b70a9cb5..5836ddf0c296 100644 --- a/arch/arm64/boot/dts/amlogic/meson64_odroidc4.dts +++ b/arch/arm64/boot/dts/amlogic/meson64_odroidc4.dts @@ -841,3 +841,61 @@ &meson_cooldev { status = "okay"; }; + +&spicc0 { + status = "disabled"; + + /* + 40 Pin Header : MOSI(GPIOX.8->19 Pin), MISO(GPIOX.9->21 Pin), + SPI0_CLK(GPIOX.11->23 Pin) + SPI_CE0(GPIOX.2->22 Pin), SPI_CE1(GPIOX.10->24 Pin) + */ + pinctrl-names = "default","gpio_periphs"; + pinctrl-0 = <&spicc0_pins_x>; + pinctrl-1 = <&spicc0_to_gpiox>; + num_chipselect = <2>; + + cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>, + <&gpio GPIOA_4 GPIO_ACTIVE_LOW>; + + can0: can@0 { + compatible = "microchip,mcp2515"; + reg = <0>; + spi-max-frequency = <10000000>; + status = "disabled"; + gpio-irq = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>; + }; + + spidev@0 { + status = "disabled"; + + compatible = "linux,spidev"; + /* spi default max clock 100Mhz */ + spi-max-frequency = <100000000>; + reg = <0>; + }; + + /* SPI 3.2" Touch Screen Define */ + ads7846@1 { + status = "disabled"; + + spi-max-frequency = <1000000>; + + compatible = "ti,ads7846"; + + reg = <1>; + + /* ODROID-N2 Touch interrupt gpio */ + pendown-gpio = <&gpio GPIOX_3 GPIO_ACTIVE_HIGH>; + + ti,swap-xy = <1>; + ti,x-min = /bits/ 16 <0>; + ti,x-max = /bits/ 16 <8000>; + ti,y-min = /bits/ 16 <0>; + ti,y-max = /bits/ 16 <4800>; + ti,x-plate-ohms = /bits/ 16 <40>; + ti,pressure-max = /bits/ 16 <255>; + + linux,wakeup; + }; +};