diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index b34feb3d1ff8c0..10d1886cade212 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -105,8 +105,19 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ pwm-ir-tx.dtbo \ qca7000.dtbo \ rotary-encoder.dtbo \ + rpi-adf4371.dtbo \ + rpi-ad5686.dtbo \ + rpi-ad7190.dtbo \ + rpi-ad738x.dtbo \ + rpi-ad7768.dtbo \ + rpi-ad9834.dtbo \ + rpi-adgs1408.dtbo \ + rpi-adxl372.dtbo \ + rpi-adxl375.dtbo \ + rpi-ad5770r.dtbo \ rpi-backlight.dtbo \ rpi-cirrus-wm5102.dtbo \ + rpi-cn0508.dtbo \ rpi-dac.dtbo \ rpi-display.dtbo \ rpi-ft5406.dtbo \ diff --git a/arch/arm/boot/dts/overlays/rpi-ad5686-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ad5686-overlay.dts new file mode 100644 index 00000000000000..280d018e7c7adf --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-ad5686-overlay.dts @@ -0,0 +1,36 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708"; + + fragment@0 { + target-path = "/"; + __overlay__ { + adc_vref: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-boot-on; + }; + }; + }; + + fragment@1 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ad5686r@0{ + compatible = "adi,ad5686r"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpha; + vcc-supply = <&adc_vref>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-ad5770r-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ad5770r-overlay.dts new file mode 100644 index 00000000000000..6500b1278297a5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-ad5770r-overlay.dts @@ -0,0 +1,66 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708"; + + fragment@0 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ad5770r@0 { + compatible = "ad5770r"; + reg = <0>; + spi-max-frequency = <1000000>; + vref-supply = <&vref>; + + reset-gpios = <&gpio 22 0>; + + channel@0 { + num = <0>; + adi,range-microamp = <(-60000) 300000>; + }; + + channel@1 { + num = <1>; + adi,range-microamp = <0 140000>; + }; + + channel@2 { + num = <2>; + adi,range-microamp = <0 55000>; + }; + + channel@3 { + num = <3>; + adi,range-microamp = <0 45000>; + }; + + channel@4 { + num = <4>; + adi,range-microamp = <0 45000>; + }; + + channel@5 { + num = <5>; + adi,range-microamp = <0 45000>; + }; + }; + }; + }; + + fragment@1 { + target-path = "/"; + __overlay__ { + vref: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply"; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-ad7190-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ad7190-overlay.dts new file mode 100644 index 00000000000000..3eaccad5be38da --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-ad7190-overlay.dts @@ -0,0 +1,64 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; + + fragment@0 { + target-path = "/"; + __overlay__ { + dvdd: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + }; + }; + + fragment@1 { + target-path = "/"; + __overlay__ { + avdd: fixedregulator@1 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply2"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + }; + }; + + fragment@3 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ad7190@0 { + compatible = "adi,ad7190"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpol; + spi-cpha; + #interrupt-cells = <2>; + interrupts = <25 0x2>; + interrupt-parent = <&gpio>; + dvdd-supply = <&dvdd>; + avdd-supply = <&avdd>; + + adi,reference-voltage-mv = /bits/ 16 <3300>; + adi,clock-source-select = [02]; + adi,refin2-pins-enable; + adi,rejection-60-Hz-enable; + adi,chop-enable; + adi,buffer-enable; + adi,burnout-currents-enable; + adi,sinc3-filter-enable; + adi,unipolar-enable; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-ad738x-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ad738x-overlay.dts new file mode 100644 index 00000000000000..99b1e4af2225ff --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-ad738x-overlay.dts @@ -0,0 +1,38 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708"; + + fragment@0 { + target-path = "/"; + __overlay__ { + adc_vref: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-boot-on; + }; + }; + }; + + fragment@1 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ad7380@0 { + compatible = "ad7380"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpol; + interrupts = <25 2>; + interrupt-parent = <&gpio>; + vref-supply = <&adc_vref>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-ad7768-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ad7768-overlay.dts new file mode 100644 index 00000000000000..060d8739adad66 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-ad7768-overlay.dts @@ -0,0 +1,55 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708"; + + fragment@0 { + target-path = "/"; + __overlay__ { + adc_vref: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply"; + regulator-min-microvolt = <4096000>; + regulator-max-microvolt = <4096000>; + regulator-boot-on; + }; + }; + }; + + fragment@1 { + target-path = "/"; + __overlay__ { + clocks { + ad7768_mclk: clock@0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <16384000>; + }; + }; + }; + }; + + fragment@2 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ad7768@0{ + compatible = "ad7768-1"; + reg = <0>; + spi-max-frequency = <16000000>; + spi-cpol; + spi-cpha; + #interrupt-cells = <2>; + interrupts = <25 0x2>; + interrupt-parent = <&gpio>; + vref-supply = <&adc_vref>; + clocks = <&ad7768_mclk>; + clock-names = "mclk"; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-ad9834-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ad9834-overlay.dts new file mode 100644 index 00000000000000..5f4c904757e08a --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-ad9834-overlay.dts @@ -0,0 +1,45 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708", "brcm,bcm2709"; + + fragment@0 { + target-path = "/"; + __overlay__ { + vcc: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-boot-on; + }; + + osc: oscillator { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + }; + }; + }; + + fragment@1 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ad9833@0{ + #clock-cells = <0>; + compatible = "ad9833"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpol; + clocks = <&osc>; + vcc-supply = <&vcc>; + }; + }; + }; +}; + diff --git a/arch/arm/boot/dts/overlays/rpi-adf4371-overlay.dts b/arch/arm/boot/dts/overlays/rpi-adf4371-overlay.dts new file mode 100644 index 00000000000000..07dfc4010744b8 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-adf4371-overlay.dts @@ -0,0 +1,36 @@ +/dts-v1/; +/plugin/; + +/ { + + + fragment@0 { + target-path = "/"; + __overlay__ { + clocks { + adf4371_clkin: clock@0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <100000000>; // 100MHz + }; + }; + }; + }; + + fragment@1 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + adf4371@0 { + compatible = "adi,adf4371"; + reg = <0>; + spi-max-frequency = <1000000>; + clocks = <&adf4371_clkin>; + clock-names = "clkin"; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-adgs1408-overlay.dts b/arch/arm/boot/dts/overlays/rpi-adgs1408-overlay.dts new file mode 100644 index 00000000000000..bfd10b3d2e9a1e --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-adgs1408-overlay.dts @@ -0,0 +1,46 @@ +/dts-v1/; +/plugin/; + +#include "../../../include/dt-bindings/mux/mux.h" + +/ { + compatible = "brcm,bcm2708"; + + fragment@0 { + target-path = "/"; + __overlay__ { + adc-mux@3 { + compatible = "io-channel-mux"; + io-channels = <&adc 1>; + io-channel-names = "parent"; + mux-controls = <&mux>; + + channels = "out_a0", "out_a1", "test0", "test1", + "out_b0", "out_b1", "testb0", "testb1"; + }; + }; + }; + + fragment@1 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + mux: mux-controller@2 { + compatible = "adi,adgs1408"; + reg = <0>; + spi-max-frequency = <1000000>; + #mux-control-cells = <0>; + }; + + adc: ad7298@3 { + compatible = "ad7298"; + #io-channel-cells = <1>; + spi-max-frequency = <1000000>; + reg = <1>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-adxl372-overlay.dts b/arch/arm/boot/dts/overlays/rpi-adxl372-overlay.dts new file mode 100644 index 00000000000000..5eed7fb0e5e7da --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-adxl372-overlay.dts @@ -0,0 +1,23 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708"; + + fragment@0 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + adxl372@0 { + compatible = "adi,adxl372"; + reg = <0>; + spi-max-frequency = <1000000>; + interrupts = <25 2>; + interrupt-parent = <&gpio>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-adxl375-overlay.dts b/arch/arm/boot/dts/overlays/rpi-adxl375-overlay.dts new file mode 100644 index 00000000000000..3bd9e397e912ff --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-adxl375-overlay.dts @@ -0,0 +1,42 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708", "brcm,bcm2709"; + + fragment@0 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + adxl375@053 { + compatible = "adi,adxl375"; + reg = <0x53>; + interrupt-parent = <&gpio>; + interrupts = <25 2>; + }; + }; + }; + + + fragment@1 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + adxl375@0 { + compatible = "adi,adxl375"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpha; + spi-cpol; + interrupts = <25 2>; + interrupt-parent = <&gpio>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-cn0508-overlay.dts b/arch/arm/boot/dts/overlays/rpi-cn0508-overlay.dts new file mode 100644 index 00000000000000..9a55b4028cfc7d --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-cn0508-overlay.dts @@ -0,0 +1,247 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; + + fragment@0 { + target = <&spi0_cs_pins>; + frag0: __overlay__ { + brcm,pins = <22 27 8 7>; + brcm,function = <1>; /* output */ + }; + }; + + fragment@1 { + target = <&spi0>; + frag1: __overlay__ { + cs-gpios = <&gpio 22 1>, <&gpio 27 1>, + <&gpio 8 1>, <&gpio 7 1>; + status = "okay"; + }; + }; + + __overrides__ { + cs0_pin = <&frag0>,"brcm,pins:0", + <&frag1>,"cs-gpios:4"; + cs1_pin = <&frag0>,"brcm,pins:4", + <&frag1>,"cs-gpios:16"; + cs2_pin = <&frag0>,"brcm,pins:8", + <&frag1>,"cs-gpios:28"; + cs3_pin = <&frag0>,"brcm,pins:12", + <&frag1>,"cs-gpios:40"; + + speed = <&pitft>,"spi-max-frequency:0"; + rotate = <&pitft>,"rotate:0"; + fps = <&pitft>,"fps:0"; + debug = <&pitft>,"debug:0"; + }; + + fragment@2 { + target-path = "/"; + __overlay__ { + vref: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-boot-on; + }; + }; + }; + + fragment@3 { + target-path = "/"; + __overlay__ { + clocks { + ad7124_mclk: clock@0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <614400>; + }; + }; + }; + }; + + fragment@4 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ad5686r@0{ + compatible = "adi,ad5683r"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpha; + vcc-supply = <&vref>; + }; + }; + }; + + fragment@5 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ad7124@1 { + compatible = "adi,ad7124-4"; + reg = <1>; + spi-max-frequency = <5000000>; + interrupts = <23 2>; + interrupt-parent = <&gpio>; + refin1-supply = <&vref>; + clocks = <&ad7124_mclk>; + clock-names = "mclk"; + + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0>; + diff-channels = <0 19>; + adi,reference-select = <0>; + }; + + channel@1 { + reg = <1>; + diff-channels = <1 19>; + adi,reference-select = <0>; + }; + + channel@2 { + reg = <2>; + diff-channels = <2 19>; + adi,reference-select = <0>; + }; + + channel@3 { + reg = <3>; + diff-channels = <3 19>; + adi,reference-select = <0>; + }; + + channel@4 { + reg = <4>; + diff-channels = <4 19>; + adi,reference-select = <0>; + }; + + channel@5 { + reg = <5>; + diff-channels = <5 19>; + adi,reference-select = <0>; + }; + + channel@6 { + reg = <6>; + diff-channels = <6 19>; + adi,reference-select = <0>; + }; + + channel@7 { + reg = <7>; + diff-channels = <7 19>; + adi,reference-select = <0>; + }; + }; + }; + }; + + fragment@6 { + target = <&spidev0>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@7 { + target = <&spidev1>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@8 { + target = <&gpio>; + __overlay__ { + pitft_pins: pitft_pins { + brcm,pins = <24 25>; + brcm,function = <0 1>; /* in out */ + brcm,pull = <2 0>; /* pullup none */ + }; + }; + }; + + fragment@9 { + target = <&spi0>; + __overlay__ { + /* needed to avoid dtc warning */ + #address-cells = <1>; + #size-cells = <0>; + + pitft: pitft@2{ + compatible = "ilitek,ili9340"; + reg = <2>; + pinctrl-names = "default"; + pinctrl-0 = <&pitft_pins>; + + spi-max-frequency = <32000000>; + rotate = <90>; + fps = <25>; + bgr; + buswidth = <8>; + dc-gpios = <&gpio 25 0>; + debug = <0>; + }; + + pitft_ts@3 { + compatible = "st,stmpe610"; + reg = <3>; + + spi-max-frequency = <500000>; + irq-gpio = <&gpio 24 0x2>; /* IRQF_TRIGGER_FALLING */ + interrupts = <24 2>; /* high-to-low edge triggered */ + interrupt-parent = <&gpio>; + interrupt-controller; + + stmpe_touchscreen { + compatible = "st,stmpe-ts"; + st,sample-time = <4>; + st,mod-12b = <1>; + st,ref-sel = <0>; + st,adc-freq = <2>; + st,ave-ctrl = <3>; + st,touch-det-delay = <4>; + st,settling = <2>; + st,fraction-z = <7>; + st,i-drive = <0>; + }; + + stmpe_gpio: stmpe_gpio { + #gpio-cells = <2>; + compatible = "st,stmpe-gpio"; + /* + * only GPIO2 is wired/available + * and it is wired to the backlight + */ + st,norequest-mask = <0x7b>; + }; + }; + }; + }; + + fragment@10 { + target-path = "/soc"; + __overlay__ { + backlight { + compatible = "gpio-backlight"; + gpios = <&stmpe_gpio 2 0>; + default-on; + }; + }; + }; +};