aebf62af9b29a9d17605c970745bcea9f283cc1b
[openwrt/staging/ansuel.git] /
1 From f111016a8293b968f05450fec83020c94d0f88c2 Mon Sep 17 00:00:00 2001
2 From: Matthew Hagan <mnhagan88@gmail.com>
3 Date: Fri, 6 Aug 2021 21:44:32 +0100
4 Subject: [PATCH] ARM: dts: NSP: Add common bindings for MX64/MX65
5
6 These bindings are required for all Meraki MX64/MX65 devices. These
7 common bindings include memory (2GB), PWM LEDs, AMAC, I2C (AT24), NAND
8 partitions, EHCI, OHCI and pinctrl.
9
10 Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
11 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
12 ---
13 .../dts/bcm958625-meraki-mx6x-common.dtsi | 129 ++++++++++++++++++
14 1 file changed, 129 insertions(+)
15 create mode 100644 arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
16
17 --- /dev/null
18 +++ b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
19 @@ -0,0 +1,129 @@
20 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
21 +/*
22 + * Common Bindings for Cisco Meraki MX64 (Kingpin) and MX65 (Alamo) devices.
23 + *
24 + * Copyright (C) 2020-2021 Matthew Hagan <mnhagan88@gmail.com>
25 + */
26 +
27 +#include "bcm-nsp.dtsi"
28 +#include <dt-bindings/gpio/gpio.h>
29 +#include <dt-bindings/input/input.h>
30 +#include <dt-bindings/leds/common.h>
31 +
32 +/ {
33 + pwm-leds {
34 + compatible = "pwm-leds";
35 +
36 + led-1 {
37 + function = LED_FUNCTION_INDICATOR;
38 + color = <LED_COLOR_ID_RED>;
39 + pwms = <&pwm 1 50000>;
40 + max-brightness = <255>;
41 + };
42 +
43 + led-2 {
44 + function = LED_FUNCTION_INDICATOR;
45 + color = <LED_COLOR_ID_GREEN>;
46 + pwms = <&pwm 2 50000>;
47 + max-brightness = <255>;
48 + };
49 +
50 + led-3 {
51 + function = LED_FUNCTION_INDICATOR;
52 + color = <LED_COLOR_ID_BLUE>;
53 + pwms = <&pwm 3 50000>;
54 + max-brightness = <255>;
55 + };
56 + };
57 +};
58 +
59 +&amac2 {
60 + status = "okay";
61 +};
62 +
63 +&ehci0 {
64 + status = "okay";
65 +};
66 +
67 +&i2c0 {
68 + status = "okay";
69 +
70 + at24@50 {
71 + compatible = "atmel,24c64";
72 + reg = <0x50>;
73 + pagesize = <32>;
74 + read-only;
75 + };
76 +};
77 +
78 +&nand_controller {
79 + nand@0 {
80 + compatible = "brcm,nandcs";
81 + reg = <0>;
82 + nand-on-flash-bbt;
83 +
84 + #address-cells = <1>;
85 + #size-cells = <1>;
86 +
87 + nand-ecc-strength = <24>;
88 + nand-ecc-step-size = <1024>;
89 +
90 + brcm,nand-oob-sector-size = <27>;
91 +
92 + partition@0 {
93 + label = "u-boot";
94 + reg = <0x0 0x80000>;
95 + read-only;
96 + };
97 +
98 + partition@80000 {
99 + label = "shmoo";
100 + reg = <0x80000 0x80000>;
101 + read-only;
102 + };
103 +
104 + partition@100000 {
105 + label = "bootkernel1";
106 + reg = <0x100000 0x300000>;
107 + };
108 +
109 + partition@400000 {
110 + label = "nvram";
111 + reg = <0x400000 0x100000>;
112 + };
113 +
114 + partition@500000 {
115 + label = "bootkernel2";
116 + reg = <0x500000 0x300000>;
117 + };
118 +
119 + partition@800000 {
120 + label = "ubi";
121 + reg = <0x800000 0x3f700000>;
122 + };
123 + };
124 +};
125 +
126 +&ohci0 {
127 + status = "okay";
128 +};
129 +
130 +&pinctrl {
131 + pinctrl-names = "default";
132 + pinctrl-0 = <&pwm_leds>;
133 +
134 + pwm_leds: pwm_leds {
135 + function = "pwm";
136 + groups = "pwm1_grp", "pwm2_grp", "pwm3_grp";
137 + };
138 +};
139 +
140 +&pwm {
141 + status = "okay";
142 + #pwm-cells = <2>;
143 +};
144 +
145 +&uart0 {
146 + clock-frequency = <62500000>;
147 + status = "okay";
148 +};