From: Shimrra Shai <shimmyshai00@gmail.com>
To: jonathan.cameron@huawei.com
Cc: heiko@sntech.de, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
max.schwarz@online.de, niyas.sait@huawei.com,
shimmyshai00@gmail.com
Subject: Re: Re: [PATCH 0/0] (proposed?) Add ACPI binding to Rockchip RK3xxx I2C bus
Date: Sun, 24 Mar 2024 19:26:03 -0500 [thread overview]
Message-ID: <20240325002603.44157-1-shimmyshai00@gmail.com> (raw)
In-Reply-To: <20240322103521.00001a12@Huawei.com>
Hey Jonathan,
Since I haven't heard a reply from you so far, and I've also done some more
research on the ClockInput options and stuff I'm soon going to ask the
firmware developers to commit the following updated ACPI bindings unless I
get comment there is still something wrong with them. I'm posting about it
here because this is going to have to be the base for any revisions to
these kernel patches I propose later and so I really want to make sure I
get both "sides" of this right (i.e. both the firmware and kernel). If I
don't hear back within a few days I'm going to just send this as-is and
see if it gets accepted by the firmware team.
Note also that the kernel CRU driver currently won't be able to do anything
with all the info in the CRU binding right now, but the UEFI firmware also
pre-initializes the unit so it isn't super necessary I think, I just
thought to add the binding so it can be referenced elsewhere in the tables.
I believe this is the "proper" way from comparing the descriptions of the
ClockInput tag and "clocks" DTB option; the DTB clocks options all
reference the CRU (which makes sense from description of the physical
hardware itself), so I am fairly confident this is "best", but if anyone
objects on this side I still want to hear it as soon as possible.
ACPI binding for the CRU:
Device (CRU_) {
/* coining a new _HID is unnecessary so long as compatible string exists */
Name (_CID, "PRP0001")
Name (_UID, 0)
Name (_CCA, 0)
Method (_CRS, 0x0, Serialized) {
Name (RBUF, ResourceTemplate() {
Memory32Fixed (ReadWrite, 0xfd7c0000, 0x5c000)
ClockInput (1100000000, 1, Hz, Fixed, "CLK0", 0)
ClockInput (786432000, 1, Hz, Fixed, "CLK1", 0)
ClockInput (850000000, 1, Hz, Fixed, "CLK2", 0)
ClockInput (1188000000, 1, Hz, Fixed, "CLK3", 0)
ClockInput (702000000, 1, Hz, Fixed, "CLK4", 0)
ClockInput (400000000, 1, Hz, Fixed, "CLK5", 0)
ClockInput (500000000, 1, Hz, Fixed, "CLK6", 0)
ClockInput (800000000, 1, Hz, Fixed, "CLK7", 0)
ClockInput (100000000, 1, Hz, Fixed, "CLK8", 0)
ClockInput (400000000, 1, Hz, Fixed, "CLK9", 0)
ClockInput (100000000, 1, Hz, Fixed, "CLKA", 0)
ClockInput (200000000, 1, Hz, Fixed, "CLKB", 0)
ClockInput (500000000, 1, Hz, Fixed, "CLKC", 0)
ClockInput (375000000, 1, Hz, Fixed, "CLKD", 0)
ClockInput (150000000, 1, Hz, Fixed, "CLKE", 0)
ClockInput (200000000, 1, Hz, Fixed, "CLKF", 0)
})
Return (RBUF)
}
Name (_DSD, Package () {
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () {
Package (2) { "compatible", "rockchip,rk3588-cru" },
}
})
// PLL_PPLL
Device (CLK0) {
Name (_ADR, 0x0)
}
// PLL_AUPLL
Device (CLK1) {
Name (_ADR, 0x1)
}
// PLL_NPLL
Device (CLK2) {
Name (_ADR, 0x2)
}
// PLL_GPLL
Device (CLK3) {
Name (_ADR, 0x3)
}
// ACLK_CENTER_ROOT
Device (CLK4) {
Name (_ADR, 0x4)
}
// HCLK_CENTER_ROOT
Device (CLK5) {
Name (_ADR, 0x5)
}
// ACLK_CENTER_LOW_ROOT
Device (CLK6) {
Name (_ADR, 0x6)
}
// ACLK_TOP_ROOT
Device (CLK7) {
Name (_ADR, 0x7)
}
// PCLK_TOP_ROOT
Device (CLK8) {
Name (_ADR, 0x8)
}
// ACLK_LOW_TOP_ROOT
Device (CLK9) {
Name (_ADR, 0x9)
}
// PCLK_PMU0_ROOT
Device (CLKA) {
Name (_ADR, 0xa)
}
// HCLK_PMU_CM0_ROOT
Device (CLKB) {
Name (_ADR, 0xb)
}
// ACLK_VOP
Device (CLKC) {
Name (_ADR, 0xc)
}
// ACLK_BUS_ROOT
Device (CLKD) {
Name (_ADR, 0xd)
}
// CLK_150M_SRC
Device (CLKE) {
Name (_ADR, 0xe)
}
// CLK_GPU
Device (CLKF) {
Name (_ADR, 0xf)
}
}
ACPI bindings for I2C (I2C1 as example):
Device (I2C1) {
Name (_HID, "RKCP3001")
/* _CID is no longer required */
Name (_UID, 1)
Name (_CCA, 0)
Method (_CRS, 0x0, Serialized) {
Name (RBUF, ResourceTemplate() {
Memory32Fixed (ReadWrite, 0xfea90000, 0x1000)
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 350 }
ClockInput (198000000, 1, Hz, Fixed, "\_SB_.CRU_", PCLK_I2C1)
ClockInput (198000000, 1, Hz, Fixed, "\_SB_.CRU_", BCLK_I2C1)
})
Return (RBUF)
}
Name (_DSD, Package () {
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () {
Package (2) { "#address-cells", 1 },
Package (2) { "#size-cells", 0 },
}
})
}
---
Shimmy
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2024-03-25 0:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 17:34 [PATCH 0/0] (proposed?) Add ACPI binding to Rockchip RK3xxx I2C bus Shimrra Shai
2024-03-22 10:35 ` Jonathan Cameron
2024-03-22 15:51 ` Shimrra Shai
2024-03-25 15:41 ` Jonathan Cameron
2024-03-25 20:11 ` Niyas Sait
2024-03-25 0:26 ` Shimrra Shai [this message]
2024-03-29 23:25 ` Shimrra Shai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240325002603.44157-1-shimmyshai00@gmail.com \
--to=shimmyshai00@gmail.com \
--cc=heiko@sntech.de \
--cc=jonathan.cameron@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=max.schwarz@online.de \
--cc=niyas.sait@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox