Message ID | CAOi56cVf2vJmaXhh7C70hxX55aXbbAC=GkzXXoZc8=YjR3P80w@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Kevin, On 21/05/18 13:11, Kevin Hilman wrote: > Hi Roger, > > I'm looking at the dra7.dtsi to try to understand the base addresses, > and I'm rather confused about the node addresses vs the reg addresses > for both dcan1 and dcan2. > > Could you clarify why the reg address and node addresses are so > different for both, and where I might find the TRM that describes > these addresses? All I could find was a datasheet that didn't give > any info about the IP or the base addresses, but I'd really like to > understand what the *real* addresses are for this. From the TRM - http://www.ti.com/lit/pdf/sprui30 "Table 2-4. L4_WKUP Memory Map" contains DCAN1. "Table 2-6. L4_PER2 Memory Map" contains DCAN2. As they are in different domains, the addresses look different. Also in Chapter 24.10.5 DCAN Register Manual, Table 24-1120. DCAN Instance Summary, shows base addresses for both instances. > > I'm pinging you because you're the author of the original commit[1], > but feel free to pass along to anyone else who might be able to help. > > Thanks, > > Kevin
On Mon, May 21, 2018 at 11:43 AM, Roger Quadros <rogerq@ti.com> wrote: > Hi Kevin, > > On 21/05/18 13:11, Kevin Hilman wrote: >> Hi Roger, >> >> I'm looking at the dra7.dtsi to try to understand the base addresses, >> and I'm rather confused about the node addresses vs the reg addresses >> for both dcan1 and dcan2. >> >> Could you clarify why the reg address and node addresses are so >> different for both, and where I might find the TRM that describes >> these addresses? All I could find was a datasheet that didn't give >> any info about the IP or the base addresses, but I'd really like to >> understand what the *real* addresses are for this. > > From the TRM - http://www.ti.com/lit/pdf/sprui30 > > "Table 2-4. L4_WKUP Memory Map" contains DCAN1. > > "Table 2-6. L4_PER2 Memory Map" contains DCAN2. > > As they are in different domains, the addresses look different. > > Also in Chapter 24.10.5 DCAN Register Manual, > Table 24-1120. DCAN Instance Summary, shows base addresses for both instances. Thanks for the details and pointer to the TRM, that helps. I see now that the "reg =" lines in the DT nodes are correct, and match the TRM. What makes it confusing is that these addresses don't match the DT node addresses. IOW, it's confusing that these addresses are different dcan1: can@481cc000 { reg = <0x4ae3c000 0x2000>; That doesn't have any affect on the code obviously, but it makes reading the DT a bit confusing. Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 21/05/18 14:46, Kevin Hilman wrote: > On Mon, May 21, 2018 at 11:43 AM, Roger Quadros <rogerq@ti.com> wrote: >> Hi Kevin, >> >> On 21/05/18 13:11, Kevin Hilman wrote: >>> Hi Roger, >>> >>> I'm looking at the dra7.dtsi to try to understand the base addresses, >>> and I'm rather confused about the node addresses vs the reg addresses >>> for both dcan1 and dcan2. >>> >>> Could you clarify why the reg address and node addresses are so >>> different for both, and where I might find the TRM that describes >>> these addresses? All I could find was a datasheet that didn't give >>> any info about the IP or the base addresses, but I'd really like to >>> understand what the *real* addresses are for this. >> >> From the TRM - http://www.ti.com/lit/pdf/sprui30 >> >> "Table 2-4. L4_WKUP Memory Map" contains DCAN1. >> >> "Table 2-6. L4_PER2 Memory Map" contains DCAN2. >> >> As they are in different domains, the addresses look different. >> >> Also in Chapter 24.10.5 DCAN Register Manual, >> Table 24-1120. DCAN Instance Summary, shows base addresses for both instances. > > Thanks for the details and pointer to the TRM, that helps. I see now > that the "reg =" lines in the DT nodes are correct, and match the TRM. > What makes it confusing is that these addresses don't match the DT > node addresses. > > IOW, it's confusing that these addresses are different > > dcan1: can@481cc000 { > reg = <0x4ae3c000 0x2000>; > > That doesn't have any affect on the code obviously, but it makes > reading the DT a bit confusing. > Right, that's by error and needs to be fixed.
On Mon, May 21, 2018 at 12:47 PM, Roger Quadros <rogerq@ti.com> wrote: > On 21/05/18 14:46, Kevin Hilman wrote: >> On Mon, May 21, 2018 at 11:43 AM, Roger Quadros <rogerq@ti.com> wrote: >>> Hi Kevin, >>> >>> On 21/05/18 13:11, Kevin Hilman wrote: >>>> Hi Roger, >>>> >>>> I'm looking at the dra7.dtsi to try to understand the base addresses, >>>> and I'm rather confused about the node addresses vs the reg addresses >>>> for both dcan1 and dcan2. >>>> >>>> Could you clarify why the reg address and node addresses are so >>>> different for both, and where I might find the TRM that describes >>>> these addresses? All I could find was a datasheet that didn't give >>>> any info about the IP or the base addresses, but I'd really like to >>>> understand what the *real* addresses are for this. >>> >>> From the TRM - http://www.ti.com/lit/pdf/sprui30 >>> >>> "Table 2-4. L4_WKUP Memory Map" contains DCAN1. >>> >>> "Table 2-6. L4_PER2 Memory Map" contains DCAN2. >>> >>> As they are in different domains, the addresses look different. >>> >>> Also in Chapter 24.10.5 DCAN Register Manual, >>> Table 24-1120. DCAN Instance Summary, shows base addresses for both instances. >> >> Thanks for the details and pointer to the TRM, that helps. I see now >> that the "reg =" lines in the DT nodes are correct, and match the TRM. >> What makes it confusing is that these addresses don't match the DT >> node addresses. >> >> IOW, it's confusing that these addresses are different >> >> dcan1: can@481cc000 { >> reg = <0x4ae3c000 0x2000>; >> >> That doesn't have any affect on the code obviously, but it makes >> reading the DT a bit confusing. >> > > Right, that's by error and needs to be fixed. Patch sent: https://marc.info/?l=linux-omap&m=152693331823905&w=2 Thanks, Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 960b2c5e0df1..63bf99be1762 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi @@ -40,6 +40,8 @@ serial9 = &uart10; ethernet0 = &cpsw_emac0; ethernet1 = &cpsw_emac1; + d_can0 = &dcan1; + d_can1 = &dcan2; }; timer { @@ -1400,6 +1402,25 @@ }; }; + dcan1: can@481cc000 { + compatible = "ti,dra7-d_can"; + ti,hwmods = "dcan1"; + reg = <0x4ae3c000 0x2000>; + syscon-raminit = <&dra7_ctrl_core 0x558 0>; + interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&dcan1_sys_clk_mux>; + status = "disabled"; + }; + + dcan2: can@481d0000 { + compatible = "ti,dra7-d_can"; + ti,hwmods = "dcan2"; + reg = <0x48480000 0x2000>; + syscon-raminit = <&dra7_ctrl_core 0x558 1>; + interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sys_clkin1>; + status = "disabled"; + }; }; }; -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in