Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: FDT syscon driver
Are you mapping the register defined by the parent simplebus? Don't do
that. Map the register defined by the node itself, which is restricted to
the range that the node itself needs. There are no conflicts as far as I
can tell. Lets walk through meson-gx.dtsi and meson-gxbb.dtsi as they are
in -current:
Ethernet:
ethmac: ethernet@c9410000 {
compatible = "amlogic,meson-gx-dwmac", "amlogic,meson-gxbb-dwmac", "snps,dwmac";
reg = <0x0 0xc9410000 0x0 0x10000
-> 0x0 0xc8834540 0x0 0x4>;
interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "macirq";
status = "disabled";
};
This lets you map 4 bytes starting at 0xc8834540.
Rng:
periphs: periphs@c8834000 {
compatible = "simple-bus";
reg = <0x0 0xc8834000 0x0 0x2000>;
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>;
hwrng: rng {
compatible = "amlogic,meson-rng";
-> reg = <0x0 0x0 0x0 0x4>;
};
};
This lets you map 4 bytes starting at 0xc8834000.
Pinctrl:
aobus: bus@c8100000 {
compatible = "simple-bus";
reg = <0x0 0xc8100000 0x0 0x100000>;
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
...
&aobus {
pinctrl_aobus: pinctrl@14 {
compatible = "amlogic,meson-gxbb-aobus-pinctrl";
#address-cells = <2>;
#size-cells = <2>;
ranges;
gpio_ao: bank@14 {
-> reg = <0x0 0x00014 0x0 0x8>,
-> <0x0 0x0002c 0x0 0x4>,
-> <0x0 0x00024 0x0 0x8>;
reg-names = "mux", "pull", "gpio";
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_aobus 0 0 14>;
};
This lets you map 8 bytes starting at 0xc8100014, 4 bytes starting at
0xc810002c, and 8 bytes starting at 0xc8100024.
I don't see any conflicts here. Am I missing something?
On Sun, 1 Jul 2018, Robert Swindells wrote:
Jared McNeill <jmcneill%invisible.ca@localhost> wrote:
I don't see any conflicts. Maybe I missed them? I'm trying my best to
help.
I had posted the conflicting device lines in the message that you
quoted. They were the rng and pinctrl ones.
If I map the page at 0x@c8834000 within the ethernet driver then how
do I map the same page for rng and pinctrl drivers ?
Home |
Main Index |
Thread Index |
Old Index