Message ID | 20250417120118.17610-6-ziyao@disroot.org |
---|---|
State | New |
Headers | show |
Series | Support I2C controllers in RK3528 | expand |
On 2025-04-17 14:01, Yao Zi wrote: > Radxa E20C ships an onboard I2C EEPROM for storing production > information. Enable it in devicetree. > > Signed-off-by: Yao Zi <ziyao@disroot.org> Reading from the EEPROM on my E20C works: $ hexdump -C /sys/devices/platform/soc/ffa58000.i2c/i2c-1/1-0050/1-00500/nvmem 00000000 52 41 44 58 01 00 03 00 00 01 00 00 01 00 01 00 |RADX............| 00000010 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |X...............| 00000020 00 00 00 00 00 00 00 00 20 20 52 61 64 78 61 20 |........ Radxa | 00000030 54 65 63 68 6e 6f 6c 6f 67 79 20 43 6f 2e 2c 20 |Technology Co., | 00000040 4c 74 64 2e 00 00 00 00 00 00 44 31 45 38 31 30 |Ltd.......D1E810| 00000050 4f 32 52 32 39 58 34 59 36 00 00 00 00 00 00 00 |O2R29X4Y6.......| 00000060 00 00 00 00 00 00 00 00 00 00 9e 69 04 00 02 00 |...........i....| 00000070 0c 00 00 00 01 00 56 31 2e 31 30 32 00 00 ed 09 |......V1.102....| 00000080 05 00 03 00 78 00 00 00 01 00 30 00 00 00 00 00 |....x.....0.....| 00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0 |................| 000000a0 4c 0d 0a 5c 00 e0 4c 0d 0a 5b 00 00 00 00 00 00 |L..\..L..[......| 000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cf 50 |...............P| So this is: Reviewed-by: Jonas Karlman <jonas@kwiboo.se> Regards, Jonas > --- > arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts > index 57a446b5cbd6..6e77f7753ff7 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts > +++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts > @@ -110,6 +110,20 @@ vcc5v0_sys: regulator-5v0-vcc-sys { > }; > }; > > +&i2c1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c1m0_xfer>; > + status = "okay"; > + > + eeprom@50 { > + compatible = "belling,bl24c16a", "atmel,24c16"; > + reg = <0x50>; > + pagesize = <16>; > + read-only; > + vcc-supply = <&vcc_3v3>; > + }; > +}; > + > &pinctrl { > gpio-keys { > user_key: user-key {
diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts index 57a446b5cbd6..6e77f7753ff7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts @@ -110,6 +110,20 @@ vcc5v0_sys: regulator-5v0-vcc-sys { }; }; +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1m0_xfer>; + status = "okay"; + + eeprom@50 { + compatible = "belling,bl24c16a", "atmel,24c16"; + reg = <0x50>; + pagesize = <16>; + read-only; + vcc-supply = <&vcc_3v3>; + }; +}; + &pinctrl { gpio-keys { user_key: user-key {
Radxa E20C ships an onboard I2C EEPROM for storing production information. Enable it in devicetree. Signed-off-by: Yao Zi <ziyao@disroot.org> --- arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)