brcm2708: add linux 4.19 support
[oweals/openwrt.git] / target / linux / brcm2708 / patches-4.19 / 950-0515-BCM270X_DT-Create-bcm2708-rpi-zero.dts.patch
1 From 926eb05f48f4c805075aa535a444127de6de0dbb Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Tue, 28 May 2019 16:23:51 +0100
4 Subject: [PATCH 515/703] BCM270X_DT: Create bcm2708-rpi-zero.dts
5
6 The Pi Zero deserves a dedicated .dtb file - sharing the b-plus .dtb
7 has been observed to cause an issue with the MAC address of some
8 Ethernet dongles.
9
10 See: https://github.com/raspberrypi/linux/issues/2990
11
12 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
13 ---
14  arch/arm/boot/dts/Makefile             |   1 +
15  arch/arm/boot/dts/bcm2708-rpi-zero.dts | 117 +++++++++++++++++++++++++
16  2 files changed, 118 insertions(+)
17  create mode 100644 arch/arm/boot/dts/bcm2708-rpi-zero.dts
18
19 --- a/arch/arm/boot/dts/Makefile
20 +++ b/arch/arm/boot/dts/Makefile
21 @@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
22         bcm2708-rpi-b.dtb \
23         bcm2708-rpi-b-plus.dtb \
24         bcm2708-rpi-cm.dtb \
25 +       bcm2708-rpi-zero.dtb \
26         bcm2708-rpi-zero-w.dtb \
27         bcm2709-rpi-2-b.dtb \
28         bcm2710-rpi-3-b.dtb \
29 --- /dev/null
30 +++ b/arch/arm/boot/dts/bcm2708-rpi-zero.dts
31 @@ -0,0 +1,117 @@
32 +/dts-v1/;
33 +
34 +#include "bcm2708.dtsi"
35 +#include "bcm283x-rpi-csi1-2lane.dtsi"
36 +
37 +/ {
38 +       compatible = "raspberrypi,model-zero", "brcm,bcm2835";
39 +       model = "Raspberry Pi Zero";
40 +
41 +       chosen {
42 +               bootargs = "coherent_pool=1M";
43 +       };
44 +};
45 +
46 +&gpio {
47 +       spi0_pins: spi0_pins {
48 +               brcm,pins = <9 10 11>;
49 +               brcm,function = <4>; /* alt0 */
50 +       };
51 +
52 +       spi0_cs_pins: spi0_cs_pins {
53 +               brcm,pins = <8 7>;
54 +               brcm,function = <1>; /* output */
55 +       };
56 +
57 +       i2c0_pins: i2c0 {
58 +               brcm,pins = <0 1>;
59 +               brcm,function = <4>;
60 +       };
61 +
62 +       i2c1_pins: i2c1 {
63 +               brcm,pins = <2 3>;
64 +               brcm,function = <4>;
65 +       };
66 +
67 +       i2s_pins: i2s {
68 +               brcm,pins = <18 19 20 21>;
69 +               brcm,function = <4>; /* alt0 */
70 +       };
71 +
72 +       audio_pins: audio_pins {
73 +               brcm,pins = <>;
74 +               brcm,function = <>;
75 +       };
76 +};
77 +
78 +&uart0 {
79 +       status = "okay";
80 +};
81 +
82 +&spi0 {
83 +       pinctrl-names = "default";
84 +       pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
85 +       cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
86 +
87 +       spidev0: spidev@0{
88 +               compatible = "spidev";
89 +               reg = <0>;      /* CE0 */
90 +               #address-cells = <1>;
91 +               #size-cells = <0>;
92 +               spi-max-frequency = <125000000>;
93 +       };
94 +
95 +       spidev1: spidev@1{
96 +               compatible = "spidev";
97 +               reg = <1>;      /* CE1 */
98 +               #address-cells = <1>;
99 +               #size-cells = <0>;
100 +               spi-max-frequency = <125000000>;
101 +       };
102 +};
103 +
104 +&i2c0 {
105 +       pinctrl-names = "default";
106 +       pinctrl-0 = <&i2c0_pins>;
107 +       clock-frequency = <100000>;
108 +};
109 +
110 +&i2c1 {
111 +       pinctrl-names = "default";
112 +       pinctrl-0 = <&i2c1_pins>;
113 +       clock-frequency = <100000>;
114 +};
115 +
116 +&i2c2 {
117 +       clock-frequency = <100000>;
118 +};
119 +
120 +&i2s {
121 +       pinctrl-names = "default";
122 +       pinctrl-0 = <&i2s_pins>;
123 +};
124 +
125 +&leds {
126 +       act_led: act {
127 +               label = "led0";
128 +               linux,default-trigger = "mmc0";
129 +               gpios = <&gpio 47 0>;
130 +       };
131 +};
132 +
133 +&hdmi {
134 +       hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
135 +};
136 +
137 +&audio {
138 +       pinctrl-names = "default";
139 +       pinctrl-0 = <&audio_pins>;
140 +};
141 +
142 +/ {
143 +       __overrides__ {
144 +               act_led_gpio = <&act_led>,"gpios:4";
145 +               act_led_activelow = <&act_led>,"gpios:8";
146 +               act_led_trigger = <&act_led>,"linux,default-trigger";
147 +       };
148 +};