blob: ef1bdb9b3cfec1bcf1b22dbe76c6f99768759e4d [file] [log] [blame]
Jan Kundrát90bd7a02017-11-14 17:40:37 +01001#include "armada-388-clearfog-base.dts"
Jan Kundrát800fcf02017-11-14 13:27:44 +01002
3&w25q32 {
4 status = "okay";
Jan Kundrát23339622017-12-22 20:05:35 +01005 /* The chip itself is rated up to 50MHz for regular reads, 60MHz for
6 * all other transactions, but somehow the mere presence of the
7 * MAX14830 EV board breaks these transfers. Changing the speed all the
8 * way down to 100kHz doesn't help. */
Jan Kundrát800fcf02017-11-14 13:27:44 +01009};
Jan Kundrát28658c92017-11-13 19:32:04 +010010
11/ {
12 clocks {
13 spi_uart_clk: osc_max14830 {
14 compatible = "fixed-clock";
15 #clock-cells = <0>;
16 clock-frequency = <3686400>;
17 };
18 };
Jan Kundrát8fd3c5d2017-12-16 00:45:57 +010019
20 soc {
21 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
22 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
23 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
24 MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
25 MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000
26 /* all above is from the upstream DTS */
27
28 /* maybe-default mappings for SPI1 CS0 from the datasheet */
29 MBUS_ID(0x01, 0x1a) 0 0xd4000000 0x4000000
30 /* SPI1 CS1 */
31 MBUS_ID(0x01, 0x5a) 0 0xd8000000 0x4000000
32 /* SPI1 CS2 */
33 MBUS_ID(0x01, 0x9a) 0 0xd0000000 0x4000000
34 >;
35 };
Jan Kundrát28658c92017-11-13 19:32:04 +010036};
37
38&uart1_pins {
39 status = "disabled";
40};
41
42&uart1 {
43 status = "disabled";
44};
45
46&pinctrl {
47 hack_pins: hack_pins {
48 marvell,pins = "mpp25";
49 marvell,function = "gpio";
50 };
51};
52
53&gpio0 {
54 mikrobus_uart_tx {
55 gpio-hog;
56 /* Mark this as "active high", i.e. "1 is 1", so that the interrupts act on the falling edge */
57 gpios = <25 GPIO_ACTIVE_HIGH>;
58 input;
59 line-name = "SPI-int";
60 };
61};
62
63&spi1 {
Jan Kundrát8fd3c5d2017-12-16 00:45:57 +010064 reg = <MBUS_ID(0xf0, 0x01) 0x10680 0x50> /* control */
65 , <MBUS_ID(0x01, 0x1a) 0 0xffffffff> /* CS0 */
66 , <MBUS_ID(0x01, 0x5a) 0 0xffffffff> /* CS1 */
67 , <MBUS_ID(0x01, 0x9a) 0 0xffffffff> /* CS2 */
68 , <MBUS_ID(0x01, 0xda) 0 0xffffffff> /* CS3 */
69 ;
70
Jan Kundrát28658c92017-11-13 19:32:04 +010071 max14830: max14830@2 {
72 compatible = "maxim,max14830";
73 reg = <2>;
74 clocks = <&spi_uart_clk>;
75 clock-names = "xtal";
76 interrupt-parent = <&gpio0>;
Jan Kundrát9050b252017-12-16 00:45:19 +010077 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
Jan Kundrát28658c92017-11-13 19:32:04 +010078 pinctrl-0 = <&hack_pins>;
79 pinctrl-names = "default";
80 gpio-controller;
81 #gpio-cells = <2>;
82 spi-max-frequency = <26000000>;
83 };
84};