Skip to content

BCM270x_DT: Configure UART using DT #910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
intc = &intc;
leds = &leds;
sound = &sound;
uart = &uart;
};

sound: sound {
Expand Down Expand Up @@ -44,6 +45,10 @@
};
};

&uart {
status = "okay";
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
Expand Down Expand Up @@ -99,6 +104,7 @@

/ {
__overrides__ {
uart = <&uart>,"status";
i2s = <&i2s>,"status";
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
intc = &intc;
leds = &leds;
sound = &sound;
uart = &uart;
};

sound: sound {
Expand Down Expand Up @@ -44,6 +45,10 @@
};
};

&uart {
status = "okay";
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
Expand Down Expand Up @@ -93,6 +98,7 @@

/ {
__overrides__ {
uart = <&uart>,"status";
i2s = <&i2s>,"status";
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
Expand Down
20 changes: 19 additions & 1 deletion arch/arm/boot/dts/bcm2708.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
#interrupt-cells = <2>;
};

uart: uart@7e201000 {
compatible = "arm,primecell", "arm,pl011";
reg = <0x7e201000 0x1000>;
interrupts = <2 25>;
clocks = <&clk_uart>;
clock-names = "apb_pclk";
arm,primecell-periphid = <0x00241011>;
status = "disabled";
};

i2s: i2s@7e203000 {
compatible = "brcm,bcm2708-i2s";
reg = <0x7e203000 0x20>,
Expand Down Expand Up @@ -91,7 +101,7 @@
#address-cells = <1>;
#size-cells = <0>;

clk_i2c: i2c {
clk_i2c: clock@1 {
compatible = "fixed-clock";
reg = <1>;
#clock-cells = <0>;
Expand All @@ -105,5 +115,13 @@
clock-output-names = "spi";
clock-frequency = <250000000>;
};

clk_uart: clock@3 {
compatible = "fixed-clock";
reg = <3>;
#clock-cells = <0>;
clock-output-names = "uart";
clock-frequency = <3000000>;
};
};
};
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2709-rpi-2-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
intc = &intc;
leds = &leds;
sound = &sound;
uart = &uart;
};

sound: sound {
Expand Down Expand Up @@ -44,6 +45,10 @@
};
};

&uart {
status = "okay";
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
Expand Down Expand Up @@ -99,6 +104,7 @@

/ {
__overrides__ {
uart = <&uart>,"status";
i2s = <&i2s>,"status";
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
Expand Down
20 changes: 19 additions & 1 deletion arch/arm/boot/dts/bcm2709.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
#interrupt-cells = <2>;
};

uart: uart@7e201000 {
compatible = "arm,primecell", "arm,pl011";
reg = <0x7e201000 0x1000>;
interrupts = <2 25>;
clocks = <&clk_uart>;
clock-names = "apb_pclk";
arm,primecell-periphid = <0x00241011>;
status = "disabled";
};

i2s: i2s@7e203000 {
compatible = "brcm,bcm2708-i2s";
reg = <0x7e203000 0x20>,
Expand Down Expand Up @@ -92,7 +102,7 @@
#address-cells = <1>;
#size-cells = <0>;

clk_i2c: i2c {
clk_i2c: clock@1 {
compatible = "fixed-clock";
reg = <1>;
#clock-cells = <0>;
Expand All @@ -106,6 +116,14 @@
clock-output-names = "spi";
clock-frequency = <250000000>;
};

clk_uart: clock@3 {
compatible = "fixed-clock";
reg = <3>;
#clock-cells = <0>;
clock-output-names = "uart";
clock-frequency = <3000000>;
};
};

timer {
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-bcm2708/bcm2708.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,10 +932,11 @@ void __init bcm2708_init(void)
i2c_register_board_info_dt(1, snd_pcm512x_i2c_devices, ARRAY_SIZE(snd_pcm512x_i2c_devices));
#endif


for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i];
amba_device_register(d, &iomem_resource);
if (!use_dt) {
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i];
amba_device_register(d, &iomem_resource);
}
}
system_rev = boardrev;
system_serial_low = serial;
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-bcm2709/bcm2709.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,10 +954,11 @@ void __init bcm2709_init(void)
i2c_register_board_info_dt(1, snd_pcm512x_i2c_devices, ARRAY_SIZE(snd_pcm512x_i2c_devices));
#endif


for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i];
amba_device_register(d, &iomem_resource);
if (!use_dt) {
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i];
amba_device_register(d, &iomem_resource);
}
}
system_rev = boardrev;
system_serial_low = serial;
Expand Down